ops_manager_ui_drivers 1.20.0 → 1.21.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 840b4fd326d2a702b67edf5cf79c02e008e44482
|
4
|
+
data.tar.gz: 81bc8292afc5e690cc142f0976e75c33713cd30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a4ae08fabb07810f967ec596498766c2f4eb0e0fac24e166dfc32bfe0962f0e02d1484437d47bf3a280a0c904e1a429102728a86daf24558ce7c78c52bc47f5
|
7
|
+
data.tar.gz: abe3562ef125a045dd8ac3e03849c517a432203a808db51b57bd865234840649f318706e57e43b9699d1a149af66f41c0782c0d55d1858fe5c148a241d4a63c5
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module OpsManagerUiDrivers
|
2
2
|
module Version17
|
3
|
-
class
|
3
|
+
class JobAzAndNetworkMappingHelper
|
4
4
|
def initialize(product_name:, browser:)
|
5
5
|
@product_name = product_name
|
6
6
|
@browser = browser
|
@@ -8,19 +8,22 @@ module OpsManagerUiDrivers
|
|
8
8
|
|
9
9
|
SINGLETON_AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[singleton_availability_zone_reference]']"
|
10
10
|
AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[availability_zone_references][]']"
|
11
|
+
NETWORK_FIELD_NAME = "product_network_reference"
|
11
12
|
|
12
|
-
def
|
13
|
+
def assign_azs_and_network(singleton_availability_zone: nil, availability_zones: [], network:)
|
13
14
|
open_form
|
14
15
|
|
16
|
+
got_azs = false
|
15
17
|
browser.all(AVAILABILITY_ZONE_INPUT_SELECTOR).each do |checkbox|
|
18
|
+
got_azs = true
|
16
19
|
checkbox.set(false)
|
17
20
|
end
|
18
21
|
|
19
|
-
availability_zones.each
|
20
|
-
|
21
|
-
|
22
|
+
availability_zones.each { |az_name| browser.check("#{az_name}") } if got_azs
|
23
|
+
|
24
|
+
browser.choose("#{singleton_availability_zone}") if got_azs
|
22
25
|
|
23
|
-
browser.
|
26
|
+
browser.find_field(NETWORK_FIELD_NAME).find(:option, text: network).select_option
|
24
27
|
|
25
28
|
save_form
|
26
29
|
end
|
@@ -44,6 +47,13 @@ module OpsManagerUiDrivers
|
|
44
47
|
end
|
45
48
|
end
|
46
49
|
|
50
|
+
def product_network
|
51
|
+
open_form
|
52
|
+
selected_options = browser.find_field(NETWORK_FIELD_NAME).all('option[selected]')
|
53
|
+
raise ArgumentError, "#{NETWORK_FIELD_NAME} not selected" if selected_options.empty?
|
54
|
+
selected_options.first.text
|
55
|
+
end
|
56
|
+
|
47
57
|
private
|
48
58
|
|
49
59
|
attr_reader :browser, :product_name
|
@@ -51,7 +61,7 @@ module OpsManagerUiDrivers
|
|
51
61
|
def open_form
|
52
62
|
browser.visit '/'
|
53
63
|
browser.click_on "show-#{product_name}-configure-action"
|
54
|
-
browser.click_on "show-#{product_name}-
|
64
|
+
browser.click_on "show-#{product_name}-azs-and-network-assignment-action"
|
55
65
|
end
|
56
66
|
|
57
67
|
def save_form
|
@@ -44,24 +44,24 @@ module OpsManagerUiDrivers
|
|
44
44
|
Version17::ProductStatusHelper.new(browser: browser, product_name: product_name)
|
45
45
|
end
|
46
46
|
|
47
|
-
def job_network_mapping_for(product_name)
|
48
|
-
Version17::JobNetworkMappingHelper.new(browser: browser, product_name: product_name)
|
49
|
-
end
|
50
|
-
|
51
47
|
def product_availability_zones(product_name)
|
52
48
|
Version17::ProductAvailabilityZones.new(browser: browser, product: product_name)
|
53
49
|
end
|
54
50
|
|
55
|
-
def
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
51
|
+
def job_azs_and_network_mapping_for(product_name)
|
52
|
+
Version17::JobAzAndNetworkMappingHelper.new(
|
53
|
+
browser: browser,
|
54
|
+
product_name: product_name,
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
def assign_azs_and_network_for_product(product_name:, zones:, network:)
|
59
|
+
|
60
|
+
job_azs_and_network_mapping_for(product_name).assign_azs_and_network(
|
61
|
+
singleton_availability_zone: zones[0]['name'],
|
62
|
+
availability_zones: zones.map { |z| z['name'] },
|
63
|
+
network: network
|
64
|
+
)
|
65
65
|
end
|
66
66
|
|
67
67
|
def current_time
|
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: 1.
|
4
|
+
version: 1.21.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: 2015-12-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -244,7 +244,7 @@ files:
|
|
244
244
|
- lib/ops_manager_ui_drivers/version17/bosh_product_sections/iaas_configuration.rb
|
245
245
|
- lib/ops_manager_ui_drivers/version17/bosh_product_sections/networks.rb
|
246
246
|
- lib/ops_manager_ui_drivers/version17/bosh_product_sections/subnet.rb
|
247
|
-
- lib/ops_manager_ui_drivers/version17/
|
247
|
+
- lib/ops_manager_ui_drivers/version17/job_az_and_network_mapping_helper.rb
|
248
248
|
- lib/ops_manager_ui_drivers/version17/job_network_mapping_helper.rb
|
249
249
|
- lib/ops_manager_ui_drivers/version17/job_status_helper.rb
|
250
250
|
- lib/ops_manager_ui_drivers/version17/ops_manager_director.rb
|