ops_manager_ui_drivers 2.39.0 → 2.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ops_manager_ui_drivers/page_helpers.rb +12 -0
- data/lib/ops_manager_ui_drivers/version.rb +1 -1
- data/lib/ops_manager_ui_drivers/version110/product_dashboard.rb +4 -3
- data/lib/ops_manager_ui_drivers/version110/product_errands.rb +6 -3
- data/lib/ops_manager_ui_drivers/version111/api.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/available_products.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/bosh_product_form_section.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/iaas_configuration.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/networks.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/subnet.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/job_az_and_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/job_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/job_status_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/ops_manager_director.rb +19 -0
- data/lib/ops_manager_ui_drivers/version111/product_availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version111/product_configuration.rb +15 -0
- data/lib/ops_manager_ui_drivers/version111/product_dashboard.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/product_errands.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/product_form.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/product_logs.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/product_resource_configuration.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/product_status_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/settings.rb +27 -0
- data/lib/ops_manager_ui_drivers/version111/setup.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/state_change_progress.rb +8 -0
- data/lib/ops_manager_ui_drivers/version111/user_settings.rb +11 -0
- data/lib/ops_manager_ui_drivers/version111/web_ui.rb +112 -0
- metadata +27 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b6918aaa9b5856db966eacce003ca5574aa2f6
|
4
|
+
data.tar.gz: eb4eca73ba705ab94b649bad120b99b620853493
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccde72b02b3990d163ad93eceb0898d0d02ede1aa8601d70f92a8d809ae5d50edeaab7e59f9d742ada30122183f9d20181447f929d98bdbc4e12618502f9ca33
|
7
|
+
data.tar.gz: 3cac0350e08a216b4288d42727442825ef4d7e4a770abdceb2701f30a152f05bbf4b5e9e5c6075c4e2f768b1ec5c1e22c8a5e34bb1ba4bee9b30414fa11ff305
|
@@ -60,6 +60,14 @@ module OpsManagerUiDrivers
|
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
63
|
+
def om_1_11(ops_manager_url, browser = self)
|
64
|
+
@om_1_11 ||= create_web_ui(
|
65
|
+
ops_manager_url: ops_manager_url,
|
66
|
+
browser: browser,
|
67
|
+
version_module: Version111,
|
68
|
+
)
|
69
|
+
end
|
70
|
+
|
63
71
|
def api_1_4(host:, username:, password:)
|
64
72
|
Version14::Api.new(host_uri: host, username: username, password: password)
|
65
73
|
end
|
@@ -88,6 +96,10 @@ module OpsManagerUiDrivers
|
|
88
96
|
Version110::Api.new(host_uri: host, username: username, password: password)
|
89
97
|
end
|
90
98
|
|
99
|
+
def api_1_11(host:, username:, password:)
|
100
|
+
Version111::Api.new(host_uri: host, username: username, password: password)
|
101
|
+
end
|
102
|
+
|
91
103
|
alias_method :om_rc, :om_1_10
|
92
104
|
alias_method :api_rc, :api_1_10
|
93
105
|
|
@@ -53,9 +53,10 @@ module OpsManagerUiDrivers
|
|
53
53
|
errand_selections.each do |errand_identifier, errand_run_state|
|
54
54
|
|
55
55
|
state_map = {
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
'default' => 0,
|
57
|
+
true => 1,
|
58
|
+
false => 2,
|
59
|
+
'when-changed' => 3,
|
59
60
|
}
|
60
61
|
|
61
62
|
browser.execute_script(
|
@@ -19,8 +19,9 @@ module OpsManagerUiDrivers
|
|
19
19
|
|
20
20
|
browser.all("select[ name^='errands[' ][ name*='][run_errand_' ]").map do |errand|
|
21
21
|
errand_name = errand[:name].match(/errands\[(.*)\]\[run_errand_.*\]/)[1]
|
22
|
-
selected_option = errand.
|
23
|
-
result << errand_name if selected_option
|
22
|
+
selected_option = errand.all('option[selected]').first
|
23
|
+
result << errand_name if selected_option == errand_state
|
24
|
+
result << errand_name if selected_option && selected_option.text == errand_state
|
24
25
|
end
|
25
26
|
|
26
27
|
result
|
@@ -35,7 +36,9 @@ module OpsManagerUiDrivers
|
|
35
36
|
private
|
36
37
|
|
37
38
|
def validate_errand_state(errand_state)
|
38
|
-
|
39
|
+
return if ['On', 'Off', 'When Changed', nil].include?(errand_state)
|
40
|
+
return if errand_state =~ /^Default \(On|Off|When Changed\)$/
|
41
|
+
raise "Invalid errand state: #{errand_state.inspect}"
|
39
42
|
end
|
40
43
|
end
|
41
44
|
end
|
data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/advanced_infrastructure_config.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/bosh_product_sections/advanced_infrastructure_config'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
module BoshProductSections
|
6
|
+
class AdvancedInfrastructureConfig < Version110::BoshProductSections::AdvancedInfrastructureConfig
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/bosh_product_sections/availability_zones'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
module BoshProductSections
|
6
|
+
class AvailabilityZones < Version110::BoshProductSections::AvailabilityZones
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/bosh_product_sections/bosh_product_form_section'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
module BoshProductSections
|
6
|
+
class BoshProductFormSection < Version110::BoshProductSections::BoshProductFormSection
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/bosh_product_sections/iaas_configuration'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
module BoshProductSections
|
6
|
+
class IaasConfiguration < Version110::BoshProductSections::IaasConfiguration
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/ops_manager_director'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
class OpsManagerDirector < Version110::OpsManagerDirector
|
6
|
+
def advanced_infrastructure_config
|
7
|
+
@advanced_infrastructure_config ||= Version111::BoshProductSections::AdvancedInfrastructureConfig.new(browser: browser)
|
8
|
+
end
|
9
|
+
|
10
|
+
def availability_zones
|
11
|
+
@availability_zones ||= Version111::BoshProductSections::AvailabilityZones.new(browser: browser)
|
12
|
+
end
|
13
|
+
|
14
|
+
def networks
|
15
|
+
@networks ||= Version111::BoshProductSections::Networks.new(browser: browser)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/product_configuration'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version111
|
5
|
+
class ProductConfiguration < Version110::ProductConfiguration
|
6
|
+
def product_form(form_name)
|
7
|
+
Version111::ProductForm.new(browser: browser, product_name: product_name, form_name: form_name)
|
8
|
+
end
|
9
|
+
|
10
|
+
def product_errands
|
11
|
+
Version111::ProductErrands.new(browser: browser, product_name: product_name)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version110/settings'
|
2
|
+
using OpsManagerUiDrivers::BackportRefinements
|
3
|
+
|
4
|
+
module OpsManagerUiDrivers
|
5
|
+
module Version111
|
6
|
+
module Settings
|
7
|
+
|
8
|
+
class Vcloud < Version110::Settings::Vcloud
|
9
|
+
end
|
10
|
+
|
11
|
+
class Vsphere < Version110::Settings::Vsphere
|
12
|
+
end
|
13
|
+
|
14
|
+
class AWS < Version110::Settings::AWS
|
15
|
+
end
|
16
|
+
|
17
|
+
class OpenStack < Version110::Settings::OpenStack
|
18
|
+
end
|
19
|
+
|
20
|
+
class Google < Version110::Settings::Google
|
21
|
+
end
|
22
|
+
|
23
|
+
class Azure < Version110::Settings::Azure
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'net/https'
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module OpsManagerUiDrivers
|
5
|
+
module Version111
|
6
|
+
class WebUi
|
7
|
+
def initialize(browser:)
|
8
|
+
@browser = browser
|
9
|
+
end
|
10
|
+
|
11
|
+
def setup_page
|
12
|
+
Version111::Setup.new(browser: browser)
|
13
|
+
end
|
14
|
+
|
15
|
+
def settings_page
|
16
|
+
Version111::UserSettings.new(browser: browser)
|
17
|
+
end
|
18
|
+
|
19
|
+
def product_dashboard
|
20
|
+
Version111::ProductDashboard.new(browser: browser)
|
21
|
+
end
|
22
|
+
|
23
|
+
def state_change_progress
|
24
|
+
Version111::StateChangeProgress.new(browser: browser)
|
25
|
+
end
|
26
|
+
|
27
|
+
def available_products
|
28
|
+
Version111::AvailableProducts.new(browser: browser)
|
29
|
+
end
|
30
|
+
|
31
|
+
def ops_manager_director
|
32
|
+
Version111::OpsManagerDirector.new(browser: browser)
|
33
|
+
end
|
34
|
+
|
35
|
+
def product_logs_for(product_name)
|
36
|
+
Version111::ProductLogs.new(browser: browser, product_name: product_name)
|
37
|
+
end
|
38
|
+
|
39
|
+
def product_resources_configuration(product_name)
|
40
|
+
Version111::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
|
41
|
+
end
|
42
|
+
|
43
|
+
def product(product_name)
|
44
|
+
Version111::ProductConfiguration.new(browser: browser, product_name: product_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def product_status_for(product_name)
|
48
|
+
Version111::ProductStatusHelper.new(browser: browser, product_name: product_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
def product_availability_zones(product_name)
|
52
|
+
Version111::ProductAvailabilityZones.new(browser: browser, product: product_name)
|
53
|
+
end
|
54
|
+
|
55
|
+
def job_azs_and_network_mapping_for(product_name)
|
56
|
+
Version111::JobAzAndNetworkMappingHelper.new(
|
57
|
+
browser: browser,
|
58
|
+
product_name: product_name,
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
def assign_azs_and_network_for_product(product_name:, zones:, network:)
|
63
|
+
zones_present = zones && zones.first
|
64
|
+
|
65
|
+
singleton_az = zones_present ? (zones[0]['iaas_identifier'] || zones[0]['name']) : nil
|
66
|
+
availability_zones = zones_present ? zones.map{|zone| (zone['iaas_identifier'] || zone['name']) } : nil
|
67
|
+
|
68
|
+
job_azs_and_network_mapping_for(product_name).assign_azs_and_network(
|
69
|
+
singleton_availability_zone: singleton_az,
|
70
|
+
availability_zones: availability_zones,
|
71
|
+
network: network,
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
def current_time
|
76
|
+
uri = URI(Capybara.app_host)
|
77
|
+
uri.path = '/'
|
78
|
+
Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https'), verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
|
79
|
+
response = http.request(Net::HTTP::Get.new(uri))
|
80
|
+
DateTime.parse(response['Date'])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def flash_message
|
85
|
+
browser.find('.flash-message').text
|
86
|
+
end
|
87
|
+
|
88
|
+
def availability_zone_guid_for_name(az_name)
|
89
|
+
browser.visit '/'
|
90
|
+
browser.click_on 'show-p-bosh-configure-action'
|
91
|
+
browser.click_on 'show-director-az-and-network-assignment-action'
|
92
|
+
|
93
|
+
availability_zone_options = find_az_field
|
94
|
+
availability_zone_options.each do |element|
|
95
|
+
if element.text == az_name
|
96
|
+
return element[:value]
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
attr_reader :browser
|
104
|
+
|
105
|
+
def find_az_field
|
106
|
+
browser.find_field('Singleton Availability Zone').all('option')
|
107
|
+
rescue Capybara::ElementNotFound
|
108
|
+
browser.find_field('Singleton Availability Zone', disabled: true).all('option')
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_manager_ui_drivers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.40.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -214,6 +214,31 @@ files:
|
|
214
214
|
- lib/ops_manager_ui_drivers/version110/state_change_progress.rb
|
215
215
|
- lib/ops_manager_ui_drivers/version110/user_settings.rb
|
216
216
|
- lib/ops_manager_ui_drivers/version110/web_ui.rb
|
217
|
+
- lib/ops_manager_ui_drivers/version111/api.rb
|
218
|
+
- lib/ops_manager_ui_drivers/version111/available_products.rb
|
219
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/advanced_infrastructure_config.rb
|
220
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/availability_zones.rb
|
221
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/bosh_product_form_section.rb
|
222
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/iaas_configuration.rb
|
223
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/networks.rb
|
224
|
+
- lib/ops_manager_ui_drivers/version111/bosh_product_sections/subnet.rb
|
225
|
+
- lib/ops_manager_ui_drivers/version111/job_az_and_network_mapping_helper.rb
|
226
|
+
- lib/ops_manager_ui_drivers/version111/job_network_mapping_helper.rb
|
227
|
+
- lib/ops_manager_ui_drivers/version111/job_status_helper.rb
|
228
|
+
- lib/ops_manager_ui_drivers/version111/ops_manager_director.rb
|
229
|
+
- lib/ops_manager_ui_drivers/version111/product_availability_zones.rb
|
230
|
+
- lib/ops_manager_ui_drivers/version111/product_configuration.rb
|
231
|
+
- lib/ops_manager_ui_drivers/version111/product_dashboard.rb
|
232
|
+
- lib/ops_manager_ui_drivers/version111/product_errands.rb
|
233
|
+
- lib/ops_manager_ui_drivers/version111/product_form.rb
|
234
|
+
- lib/ops_manager_ui_drivers/version111/product_logs.rb
|
235
|
+
- lib/ops_manager_ui_drivers/version111/product_resource_configuration.rb
|
236
|
+
- lib/ops_manager_ui_drivers/version111/product_status_helper.rb
|
237
|
+
- lib/ops_manager_ui_drivers/version111/settings.rb
|
238
|
+
- lib/ops_manager_ui_drivers/version111/setup.rb
|
239
|
+
- lib/ops_manager_ui_drivers/version111/state_change_progress.rb
|
240
|
+
- lib/ops_manager_ui_drivers/version111/user_settings.rb
|
241
|
+
- lib/ops_manager_ui_drivers/version111/web_ui.rb
|
217
242
|
- lib/ops_manager_ui_drivers/version14/api.rb
|
218
243
|
- lib/ops_manager_ui_drivers/version14/availability_zones.rb
|
219
244
|
- lib/ops_manager_ui_drivers/version14/available_products.rb
|