ops_manager_ui_drivers 2.9.2 → 2.9.3
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 +14 -2
- data/lib/ops_manager_ui_drivers/version.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/available_products.rb +3 -6
- data/lib/ops_manager_ui_drivers/version17/user_settings.rb +0 -1
- data/lib/ops_manager_ui_drivers/version18/api.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/available_products.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/networks.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/subnet.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/job_az_and_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/job_network_mapping_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/job_status_helper.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/ops_manager_director.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_availability_zones.rb +10 -0
- data/lib/ops_manager_ui_drivers/version18/product_configuration.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_dashboard.rb +32 -0
- data/lib/ops_manager_ui_drivers/version18/product_errands.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_form.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_logs.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_resource_configuration.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/product_status_helper.rb +9 -0
- data/lib/ops_manager_ui_drivers/version18/settings.rb +28 -0
- data/lib/ops_manager_ui_drivers/version18/setup.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/state_change_progress.rb +8 -0
- data/lib/ops_manager_ui_drivers/version18/user_settings.rb +21 -0
- data/lib/ops_manager_ui_drivers/version18/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: 5769543a03984d96aef881319cb496f60d1df90c
|
4
|
+
data.tar.gz: 04457e3822412f9e8ed3f2d7145dbf21511c7b20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b2d08bcf28a1b3e9825c43f05a997b31ea68be1af2364eee3a5fb557d830cbf0af3494c94d510a9e4c03eb2c91050bfbf8b9f6cde5571f176e7f0d10e3adc4b
|
7
|
+
data.tar.gz: 4b5db6a89a8c8b3a5841d990de35019e4c9bc9f19d8b74fe4056278afedd47358d96ef0123194e932d52f35a5d7ab86b5a7d65f8c09ce42832e24bb92df1c1cd
|
@@ -36,6 +36,14 @@ module OpsManagerUiDrivers
|
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
39
|
+
def om_1_8(ops_manager_url, browser = self)
|
40
|
+
@om_1_8 ||= create_web_ui(
|
41
|
+
ops_manager_url: ops_manager_url,
|
42
|
+
browser: browser,
|
43
|
+
version_module: Version18,
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
39
47
|
def api_1_4(host:, username:, password:)
|
40
48
|
Version14::Api.new(host_uri: host, username: username, password: password)
|
41
49
|
end
|
@@ -52,8 +60,12 @@ module OpsManagerUiDrivers
|
|
52
60
|
Version17::Api.new(host_uri: host, username: username, password: password)
|
53
61
|
end
|
54
62
|
|
55
|
-
|
56
|
-
|
63
|
+
def api_1_8(host:, username:, password:)
|
64
|
+
Version18::Api.new(host_uri: host, username: username, password: password)
|
65
|
+
end
|
66
|
+
|
67
|
+
alias_method :om_rc, :om_1_8
|
68
|
+
alias_method :api_rc, :api_1_8
|
57
69
|
|
58
70
|
private
|
59
71
|
|
@@ -3,18 +3,15 @@ require 'ops_manager_ui_drivers/wait_helper'
|
|
3
3
|
module OpsManagerUiDrivers
|
4
4
|
module Version17
|
5
5
|
class AvailableProducts
|
6
|
-
include WaitHelper
|
7
|
-
|
8
6
|
def initialize(browser:)
|
9
7
|
@browser = browser
|
10
8
|
end
|
11
9
|
|
12
10
|
def add_product_to_install(product_name)
|
13
11
|
browser.visit '/'
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
12
|
+
browser.find("ul.product-list li.#{product_name}.product").hover
|
13
|
+
browser.click_on "add-#{product_name}"
|
14
|
+
browser.find("#show-#{product_name}-configure-action")
|
18
15
|
end
|
19
16
|
|
20
17
|
def product_added?(product_name)
|
data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/bosh_product_sections/advanced_infrastructure_config'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
module BoshProductSections
|
6
|
+
class AdvancedInfrastructureConfig < Version17::BoshProductSections::AdvancedInfrastructureConfig
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/bosh_product_sections/availability_zones'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
module BoshProductSections
|
6
|
+
class AvailabilityZones < Version17::BoshProductSections::AvailabilityZones
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
module BoshProductSections
|
6
|
+
class BoshProductFormSection < Version17::BoshProductSections::BoshProductFormSection
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/bosh_product_sections/iaas_configuration'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
module BoshProductSections
|
6
|
+
class IaasConfiguration < Version17::BoshProductSections::IaasConfiguration
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/product_dashboard'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
class ProductDashboard < Version17::ProductDashboard
|
6
|
+
def delete_whole_installation
|
7
|
+
method_deprecated!
|
8
|
+
end
|
9
|
+
|
10
|
+
def delete_installation_available?
|
11
|
+
method_deprecated!
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset_state(ops_manager)
|
15
|
+
revert_pending_changes if revert_available?
|
16
|
+
if ops_manager.settings_page.delete_installation_available?
|
17
|
+
ops_manager.settings_page.delete_whole_installation_on_next_apply_updates
|
18
|
+
apply_updates
|
19
|
+
browser.poll_up_to_mins(15) do
|
20
|
+
browser.expect(ops_manager.state_change_progress).to browser.be_state_change_success
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def method_deprecated!
|
28
|
+
raise NotImplementedError, 'This method has been removed. You can find the new version on the UserSettings class'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/settings'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
module Settings
|
6
|
+
def self.for(test_settings)
|
7
|
+
iaas_type = test_settings.dig('iaas_type')
|
8
|
+
settings_class =
|
9
|
+
[Vcloud, Vsphere, AWS, OpenStack].find do |klass|
|
10
|
+
klass.works_with?(iaas_type)
|
11
|
+
end or fail("Unsupported IaaS: #{iaas_type.inspect}")
|
12
|
+
settings_class.new(test_settings)
|
13
|
+
end
|
14
|
+
|
15
|
+
class Vcloud < Version17::Settings::Vcloud
|
16
|
+
end
|
17
|
+
|
18
|
+
class Vsphere < Version17::Settings::Vsphere
|
19
|
+
end
|
20
|
+
|
21
|
+
class AWS < Version17::Settings::AWS
|
22
|
+
end
|
23
|
+
|
24
|
+
class OpenStack < Version17::Settings::OpenStack
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'ops_manager_ui_drivers/version17/user_settings'
|
2
|
+
|
3
|
+
module OpsManagerUiDrivers
|
4
|
+
module Version18
|
5
|
+
class UserSettings < Version17::UserSettings
|
6
|
+
def delete_whole_installation_on_next_apply_updates
|
7
|
+
browser.visit '/advanced_tools'
|
8
|
+
browser.click_on 'show-delete-installation-modal-action'
|
9
|
+
browser.click_on 'delete-installation-action'
|
10
|
+
end
|
11
|
+
|
12
|
+
def delete_installation_available?
|
13
|
+
browser.visit '/advanced_tools'
|
14
|
+
browser.all('#show-delete-installation-modal-action').any?
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'net/https'
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
module OpsManagerUiDrivers
|
5
|
+
module Version18
|
6
|
+
class WebUi
|
7
|
+
def initialize(browser:)
|
8
|
+
@browser = browser
|
9
|
+
end
|
10
|
+
|
11
|
+
def setup_page
|
12
|
+
Version18::Setup.new(browser: browser)
|
13
|
+
end
|
14
|
+
|
15
|
+
def settings_page
|
16
|
+
Version18::UserSettings.new(browser: browser)
|
17
|
+
end
|
18
|
+
|
19
|
+
def product_dashboard
|
20
|
+
Version18::ProductDashboard.new(browser: browser)
|
21
|
+
end
|
22
|
+
|
23
|
+
def state_change_progress
|
24
|
+
Version18::StateChangeProgress.new(browser: browser)
|
25
|
+
end
|
26
|
+
|
27
|
+
def available_products
|
28
|
+
Version18::AvailableProducts.new(browser: browser)
|
29
|
+
end
|
30
|
+
|
31
|
+
def ops_manager_director
|
32
|
+
Version18::OpsManagerDirector.new(browser: browser)
|
33
|
+
end
|
34
|
+
|
35
|
+
def product_logs_for(product_name)
|
36
|
+
Version18::ProductLogs.new(browser: browser, product_name: product_name)
|
37
|
+
end
|
38
|
+
|
39
|
+
def product_resources_configuration(product_name)
|
40
|
+
Version18::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
|
41
|
+
end
|
42
|
+
|
43
|
+
def product(product_name)
|
44
|
+
Version18::ProductConfiguration.new(browser: browser, product_name: product_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def product_status_for(product_name)
|
48
|
+
Version18::ProductStatusHelper.new(browser: browser, product_name: product_name)
|
49
|
+
end
|
50
|
+
|
51
|
+
def product_availability_zones(product_name)
|
52
|
+
Version18::ProductAvailabilityZones.new(browser: browser, product: product_name)
|
53
|
+
end
|
54
|
+
|
55
|
+
def job_azs_and_network_mapping_for(product_name)
|
56
|
+
Version18::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.9.
|
4
|
+
version: 2.9.3
|
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-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -264,6 +264,31 @@ files:
|
|
264
264
|
- lib/ops_manager_ui_drivers/version17/state_change_progress.rb
|
265
265
|
- lib/ops_manager_ui_drivers/version17/user_settings.rb
|
266
266
|
- lib/ops_manager_ui_drivers/version17/web_ui.rb
|
267
|
+
- lib/ops_manager_ui_drivers/version18/api.rb
|
268
|
+
- lib/ops_manager_ui_drivers/version18/available_products.rb
|
269
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config.rb
|
270
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones.rb
|
271
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section.rb
|
272
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration.rb
|
273
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/networks.rb
|
274
|
+
- lib/ops_manager_ui_drivers/version18/bosh_product_sections/subnet.rb
|
275
|
+
- lib/ops_manager_ui_drivers/version18/job_az_and_network_mapping_helper.rb
|
276
|
+
- lib/ops_manager_ui_drivers/version18/job_network_mapping_helper.rb
|
277
|
+
- lib/ops_manager_ui_drivers/version18/job_status_helper.rb
|
278
|
+
- lib/ops_manager_ui_drivers/version18/ops_manager_director.rb
|
279
|
+
- lib/ops_manager_ui_drivers/version18/product_availability_zones.rb
|
280
|
+
- lib/ops_manager_ui_drivers/version18/product_configuration.rb
|
281
|
+
- lib/ops_manager_ui_drivers/version18/product_dashboard.rb
|
282
|
+
- lib/ops_manager_ui_drivers/version18/product_errands.rb
|
283
|
+
- lib/ops_manager_ui_drivers/version18/product_form.rb
|
284
|
+
- lib/ops_manager_ui_drivers/version18/product_logs.rb
|
285
|
+
- lib/ops_manager_ui_drivers/version18/product_resource_configuration.rb
|
286
|
+
- lib/ops_manager_ui_drivers/version18/product_status_helper.rb
|
287
|
+
- lib/ops_manager_ui_drivers/version18/settings.rb
|
288
|
+
- lib/ops_manager_ui_drivers/version18/setup.rb
|
289
|
+
- lib/ops_manager_ui_drivers/version18/state_change_progress.rb
|
290
|
+
- lib/ops_manager_ui_drivers/version18/user_settings.rb
|
291
|
+
- lib/ops_manager_ui_drivers/version18/web_ui.rb
|
267
292
|
- lib/ops_manager_ui_drivers/wait_helper.rb
|
268
293
|
- ops_manager_ui_drivers.gemspec
|
269
294
|
homepage: https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers
|