Class: OpsManagerUiDrivers::Version17::ProductDashboard
Instance Method Summary
collapse
#disable_css_transitions!
#upgrade_microbosh
#product_complete?, #product_on_dashboard?
#delete_installation_available?, #delete_whole_installation, #deletion_in_progress?, #import_product_from, #initialize, #product_configuration_percentage, #reset_state, #revert_available?, #revert_pending_changes, #upgrade_microbosh, #upgrade_product, #version_for_product, #wait_for_installation_to_be_deleted
Instance Method Details
#apply_updates(validate: true, errands: {}) ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 35
def apply_updates(validate: true, errands: {})
open_dashboard
check_errands(errands)
browser.click_on 'install-action'
if validate
fail 'Install failed verification' if nonignorable_verification_failed?
allow_cpu_verification_errors
allow_privilege_verification_errors
allow_icmp_verification_errors
ignore_allowable_errors
assert_installation_started
end
ApplyUpdatesResult.new(browser: @browser)
end
|
#delete_product(product_name) ⇒ Object
18
19
20
21
22
23
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 18
def delete_product(product_name)
open_dashboard
disable_css_transitions!
browser.click_on "open-delete-#{product_name}-modal"
browser.click_on "delete-#{product_name}-action"
end
|
#delete_unused_products ⇒ Object
25
26
27
28
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 25
def delete_unused_products
open_dashboard
@browser.find('a#delete_unused_products').trigger('click')
end
|
#deleted_product?(product_name) ⇒ Boolean
30
31
32
33
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 30
def deleted_product?(product_name)
open_dashboard
browser.first("#show-#{product_name}-information-action").present?
end
|
#enabled_errands(product_name) ⇒ Object
53
54
55
56
57
58
59
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 53
def enabled_errands(product_name)
open_dashboard
browser.execute_script "$('li.expandable > a.title').click()"
browser.all("input[type='checkbox'][name^='enabled_errands[#{product_name}-'][checked='checked']").map do |checkbox|
checkbox.value
end
end
|
#import_installation_file(_file_path) ⇒ Object
9
10
11
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 9
def import_installation_file(_file_path)
fail('Importing is no longer supported via the Product Dashboard. See Version17::Setup#import_installation_file')
end
|
#most_recent_install_log ⇒ Object
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 61
def most_recent_install_log
browser.visit '/change_log'
sleep 4
first_log_entry = browser.first('table#change-log tbody tr td a')
if first_log_entry
base_url = first_log_entry[:href]
browser.visit "#{base_url}.text"
browser.source
else
return nil
end
end
|
#product_available?(product_name, product_version) ⇒ Boolean
13
14
15
16
|
# File 'lib/ops_manager_ui_drivers/version17/product_dashboard.rb', line 13
def product_available?(product_name, product_version)
open_dashboard
browser.all("li.#{product_name} input#product_version[value='#{product_version}']", {visible: false}).any?
end
|