ops_manager_ui_drivers 2.21.0 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ops_manager_ui_drivers/page_helpers.rb +14 -2
- data/lib/ops_manager_ui_drivers/version.rb +1 -1
- data/lib/ops_manager_ui_drivers/version18/ops_manager_director.rb +0 -1
- data/lib/ops_manager_ui_drivers/version19/api.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/available_products.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/bosh_product_form_section.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/iaas_configuration.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/networks.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/subnet.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/job_az_and_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/job_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/job_status_helper.rb +19 -0
- data/lib/ops_manager_ui_drivers/version19/ops_manager_director.rb +25 -0
- data/lib/ops_manager_ui_drivers/version19/product_availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version19/product_configuration.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_dashboard.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_errands.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_form.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_logs.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_resource_configuration.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/product_status_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/setup.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/state_change_progress.rb +8 -0
- data/lib/ops_manager_ui_drivers/version19/user_settings.rb +12 -0
- data/lib/ops_manager_ui_drivers/version19/web_ui.rb +112 -0
- metadata +26 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81803016ae304090c22538ac2349ad754f40b2e9
|
4
|
+
data.tar.gz: d5d385c4ae6dec1510411f3283fd75ab6a99ec2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f417f910441c880925c22181ac9db8271b3ea4f71a2a06eed33706749d404d626430ab33f9377e7b667a6d9a12544bebd69889d2adc6020912498fc2f387a722
|
7
|
+
data.tar.gz: e67d0d15a89c7b501542eb64d51554e4b461b3ce66386af9571c859505afbaeccfcd2bfb6a19dbdaf1dd96b8f2883cb2ae949e036d8788ec6d63235966d37f50
|
@@ -44,6 +44,14 @@ module OpsManagerUiDrivers
|
|
44
44
|
)
|
45
45
|
end
|
46
46
|
|
47
|
+
def om_1_9(ops_manager_url, browser = self)
|
48
|
+
@om_1_9 ||= create_web_ui(
|
49
|
+
ops_manager_url: ops_manager_url,
|
50
|
+
browser: browser,
|
51
|
+
version_module: Version19,
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
47
55
|
def api_1_4(host:, username:, password:)
|
48
56
|
Version14::Api.new(host_uri: host, username: username, password: password)
|
49
57
|
end
|
@@ -64,8 +72,12 @@ module OpsManagerUiDrivers
|
|
64
72
|
Version18::Api.new(host_uri: host, username: username, password: password)
|
65
73
|
end
|
66
74
|
|
67
|
-
|
68
|
-
|
75
|
+
def api_1_9(host:, username:, password:)
|
76
|
+
Version18::Api.new(host_uri: host, username: username, password: password)
|
77
|
+
end
|
78
|
+
|
79
|
+
alias_method :om_rc, :om_1_9
|
80
|
+
alias_method :api_rc, :api_1_9
|
69
81
|
|
70
82
|
private
|
71
83
|
|
@@ -23,7 +23,6 @@ module OpsManagerUiDrivers
|
|
23
23
|
|
24
24
|
browser.click_on 'show-director_configuration-action'
|
25
25
|
|
26
|
-
|
27
26
|
browser.fill_in('director_configuration[ntp_servers_string]', with: ops_manager.dig('ntp_servers'))
|
28
27
|
browser.check('Enable VM Resurrector Plugin') if ops_manager.dig('resurrector_enabled')
|
29
28
|
browser.check('Enable Post Deploy Scripts') if ops_manager.dig('post_deploy_enabled')
|
data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version19
|
5
|
+
module BoshProductSections
|
6
|
+
class AdvancedInfrastructureConfig < Version18::BoshProductSections::AdvancedInfrastructureConfig
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version19
|
5
|
+
module BoshProductSections
|
6
|
+
class AvailabilityZones < Version18::BoshProductSections::AvailabilityZones
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version19
|
5
|
+
module BoshProductSections
|
6
|
+
class BoshProductFormSection < Version18::BoshProductSections::BoshProductFormSection
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version19
|
5
|
+
module BoshProductSections
|
6
|
+
class IaasConfiguration < Version18::BoshProductSections::IaasConfiguration
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module OpsManagerUiDrivers
|
2
|
+
module Version19
|
3
|
+
class JobStatusHelper
|
4
|
+
def self.from_job_row(job_row)
|
5
|
+
ips_string = job_row.find('.actual-ips').text
|
6
|
+
ips = ips_string.split(', ')
|
7
|
+
az = job_row.all('.az').first.try(:text)
|
8
|
+
new(ips: ips, az: az)
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(ips:, az:)
|
12
|
+
@ips = ips
|
13
|
+
@az = az
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_reader :ips, :az
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version18/ops_manager_director'
|
2
|
+
using OpsManagerUiDrivers::BackportRefinements
|
3
|
+
|
4
|
+
module OpsManagerUiDrivers
|
5
|
+
module Version19
|
6
|
+
class OpsManagerDirector < Version18::OpsManagerDirector
|
7
|
+
def initialize(browser:, iaas_configuration: Version19::BoshProductSections::IaasConfiguration.new(browser: browser))
|
8
|
+
@browser = browser
|
9
|
+
@iaas_configuration = iaas_configuration
|
10
|
+
end
|
11
|
+
|
12
|
+
def advanced_infrastructure_config
|
13
|
+
@advanced_infrastructure_config ||= Version19::BoshProductSections::AdvancedInfrastructureConfig.new(browser: browser)
|
14
|
+
end
|
15
|
+
|
16
|
+
def availability_zones
|
17
|
+
@availability_zones ||= Version19::BoshProductSections::AvailabilityZones.new(browser: browser)
|
18
|
+
end
|
19
|
+
|
20
|
+
def networks
|
21
|
+
@networks ||= Version19::BoshProductSections::Networks.new(browser: browser)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'net/https'
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module OpsManagerUiDrivers
|
5
|
+
module Version19
|
6
|
+
class WebUi
|
7
|
+
def initialize(browser:)
|
8
|
+
@browser = browser
|
9
|
+
end
|
10
|
+
|
11
|
+
def setup_page
|
12
|
+
Version19::Setup.new(browser: browser)
|
13
|
+
end
|
14
|
+
|
15
|
+
def settings_page
|
16
|
+
Version19::UserSettings.new(browser: browser)
|
17
|
+
end
|
18
|
+
|
19
|
+
def product_dashboard
|
20
|
+
Version19::ProductDashboard.new(browser: browser)
|
21
|
+
end
|
22
|
+
|
23
|
+
def state_change_progress
|
24
|
+
Version19::StateChangeProgress.new(browser: browser)
|
25
|
+
end
|
26
|
+
|
27
|
+
def available_products
|
28
|
+
Version19::AvailableProducts.new(browser: browser)
|
29
|
+
end
|
30
|
+
|
31
|
+
def ops_manager_director
|
32
|
+
Version19::OpsManagerDirector.new(browser: browser)
|
33
|
+
end
|
34
|
+
|
35
|
+
def product_logs_for(product_name)
|
36
|
+
Version19::ProductLogs.new(browser: browser, product_name: product_name)
|
37
|
+
end
|
38
|
+
|
39
|
+
def product_resources_configuration(product_name)
|
40
|
+
Version19::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
|
41
|
+
end
|
42
|
+
|
43
|
+
def product(product_name)
|
44
|
+
Version19::ProductConfiguration.new(browser: browser, product_name: product_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def product_status_for(product_name)
|
48
|
+
Version19::ProductStatusHelper.new(browser: browser, product_name: product_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
def product_availability_zones(product_name)
|
52
|
+
Version19::ProductAvailabilityZones.new(browser: browser, product: product_name)
|
53
|
+
end
|
54
|
+
|
55
|
+
def job_azs_and_network_mapping_for(product_name)
|
56
|
+
Version19::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.22.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: 2016-06-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -304,6 +304,30 @@ files:
|
|
304
304
|
- lib/ops_manager_ui_drivers/version18/state_change_progress.rb
|
305
305
|
- lib/ops_manager_ui_drivers/version18/user_settings.rb
|
306
306
|
- lib/ops_manager_ui_drivers/version18/web_ui.rb
|
307
|
+
- lib/ops_manager_ui_drivers/version19/api.rb
|
308
|
+
- lib/ops_manager_ui_drivers/version19/available_products.rb
|
309
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config.rb
|
310
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/availability_zones.rb
|
311
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/bosh_product_form_section.rb
|
312
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/iaas_configuration.rb
|
313
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/networks.rb
|
314
|
+
- lib/ops_manager_ui_drivers/version19/bosh_product_sections/subnet.rb
|
315
|
+
- lib/ops_manager_ui_drivers/version19/job_az_and_network_mapping_helper.rb
|
316
|
+
- lib/ops_manager_ui_drivers/version19/job_network_mapping_helper.rb
|
317
|
+
- lib/ops_manager_ui_drivers/version19/job_status_helper.rb
|
318
|
+
- lib/ops_manager_ui_drivers/version19/ops_manager_director.rb
|
319
|
+
- lib/ops_manager_ui_drivers/version19/product_availability_zones.rb
|
320
|
+
- lib/ops_manager_ui_drivers/version19/product_configuration.rb
|
321
|
+
- lib/ops_manager_ui_drivers/version19/product_dashboard.rb
|
322
|
+
- lib/ops_manager_ui_drivers/version19/product_errands.rb
|
323
|
+
- lib/ops_manager_ui_drivers/version19/product_form.rb
|
324
|
+
- lib/ops_manager_ui_drivers/version19/product_logs.rb
|
325
|
+
- lib/ops_manager_ui_drivers/version19/product_resource_configuration.rb
|
326
|
+
- lib/ops_manager_ui_drivers/version19/product_status_helper.rb
|
327
|
+
- lib/ops_manager_ui_drivers/version19/setup.rb
|
328
|
+
- lib/ops_manager_ui_drivers/version19/state_change_progress.rb
|
329
|
+
- lib/ops_manager_ui_drivers/version19/user_settings.rb
|
330
|
+
- lib/ops_manager_ui_drivers/version19/web_ui.rb
|
307
331
|
- lib/ops_manager_ui_drivers/wait_helper.rb
|
308
332
|
- ops_manager_ui_drivers.gemspec
|
309
333
|
homepage: https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers
|