ops_manager_ui_drivers 1.28.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +0 -2
- data/lib/ops_manager_ui_drivers/page_helpers.rb +8 -8
- data/lib/ops_manager_ui_drivers/version.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/api.rb +2 -2
- data/lib/ops_manager_ui_drivers/version14/availability_zones.rb +2 -2
- data/lib/ops_manager_ui_drivers/version14/iaas_configuration.rb +6 -6
- data/lib/ops_manager_ui_drivers/version14/job_availability_zone_mapping_helper.rb +2 -2
- data/lib/ops_manager_ui_drivers/version14/job_network_mapping_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/job_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/networks.rb +5 -5
- data/lib/ops_manager_ui_drivers/version14/ops_manager_director.rb +67 -67
- data/lib/ops_manager_ui_drivers/version14/product_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/product_dashboard.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/product_form.rb +2 -2
- data/lib/ops_manager_ui_drivers/version14/product_logs.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/product_resource_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/product_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/state_change_progress.rb +1 -1
- data/lib/ops_manager_ui_drivers/version14/web_ui.rb +3 -3
- data/lib/ops_manager_ui_drivers/version15/job_availability_zone_mapping_helper.rb +2 -2
- data/lib/ops_manager_ui_drivers/version15/job_network_mapping_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/job_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/microbosh_sections/availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/microbosh_sections/networks.rb +11 -11
- data/lib/ops_manager_ui_drivers/version15/ops_manager_director.rb +10 -10
- data/lib/ops_manager_ui_drivers/version15/product_availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/product_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/product_errands.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/product_form.rb +2 -2
- data/lib/ops_manager_ui_drivers/version15/product_logs.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/product_resource_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/product_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/settings.rb +40 -38
- data/lib/ops_manager_ui_drivers/version15/state_change_progress.rb +1 -1
- data/lib/ops_manager_ui_drivers/version15/web_ui.rb +3 -3
- data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/networks.rb +11 -11
- data/lib/ops_manager_ui_drivers/version16/job_availability_zone_mapping_helper.rb +2 -2
- data/lib/ops_manager_ui_drivers/version16/job_network_mapping_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/job_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/ops_manager_director.rb +8 -8
- data/lib/ops_manager_ui_drivers/version16/product_availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_dashboard.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_errands.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_form.rb +2 -2
- data/lib/ops_manager_ui_drivers/version16/product_logs.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_resource_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/product_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/settings.rb +41 -39
- data/lib/ops_manager_ui_drivers/version16/state_change_progress.rb +1 -1
- data/lib/ops_manager_ui_drivers/version16/web_ui.rb +3 -3
- data/lib/ops_manager_ui_drivers/version17/api.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb +2 -2
- data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/networks.rb +2 -2
- data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/subnet.rb +6 -6
- data/lib/ops_manager_ui_drivers/version17/job_az_and_network_mapping_helper.rb +3 -3
- data/lib/ops_manager_ui_drivers/version17/job_network_mapping_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/job_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/ops_manager_director.rb +21 -21
- data/lib/ops_manager_ui_drivers/version17/product_availability_zones.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/product_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/product_dashboard.rb +4 -0
- data/lib/ops_manager_ui_drivers/version17/product_errands.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/product_form.rb +2 -2
- data/lib/ops_manager_ui_drivers/version17/product_logs.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/product_resource_configuration.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/product_status_helper.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/settings.rb +42 -40
- data/lib/ops_manager_ui_drivers/version17/setup.rb +10 -0
- data/lib/ops_manager_ui_drivers/version17/state_change_progress.rb +1 -1
- data/lib/ops_manager_ui_drivers/version17/web_ui.rb +4 -4
- data/lib/ops_manager_ui_drivers.rb +3 -3
- data/ops_manager_ui_drivers.gemspec +7 -8
- metadata +2 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7286d612b2128a4a6b9366524759bac3548e38c
|
4
|
+
data.tar.gz: c48113714c723739253939906847a06900159360
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1f9389c7e24a0d48024e3c4b64687974017701da651cc2c6fe547ae49b728661969ff5f48ee208f16ac1012dd5af5bbe08cce6b06b5f4bb02b7ef3fe60c045
|
7
|
+
data.tar.gz: 3b5c711c002780cab1738977b107291c636c02c607df8a8f8228eccb21ddda93f684ad432a8b8d3e004fc9bea5c438a7d6bd471cf49e2fbce4f3fbef904c3e12
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
@@ -7,32 +7,32 @@ module OpsManagerUiDrivers
|
|
7
7
|
def om_1_4(ops_manager_url, browser = self)
|
8
8
|
@om_1_4 ||= create_web_ui(
|
9
9
|
ops_manager_url: ops_manager_url,
|
10
|
-
browser:
|
11
|
-
version_module:
|
10
|
+
browser: browser,
|
11
|
+
version_module: Version14,
|
12
12
|
)
|
13
13
|
end
|
14
14
|
|
15
15
|
def om_1_5(ops_manager_url, browser = self)
|
16
16
|
@om_1_5 ||= create_web_ui(
|
17
17
|
ops_manager_url: ops_manager_url,
|
18
|
-
browser:
|
19
|
-
version_module:
|
18
|
+
browser: browser,
|
19
|
+
version_module: Version15,
|
20
20
|
)
|
21
21
|
end
|
22
22
|
|
23
23
|
def om_1_6(ops_manager_url, browser = self)
|
24
24
|
@om_1_6 ||= create_web_ui(
|
25
25
|
ops_manager_url: ops_manager_url,
|
26
|
-
browser:
|
27
|
-
version_module:
|
26
|
+
browser: browser,
|
27
|
+
version_module: Version16,
|
28
28
|
)
|
29
29
|
end
|
30
30
|
|
31
31
|
def om_1_7(ops_manager_url, browser = self)
|
32
32
|
@om_1_7 ||= create_web_ui(
|
33
33
|
ops_manager_url: ops_manager_url,
|
34
|
-
browser:
|
35
|
-
version_module:
|
34
|
+
browser: browser,
|
35
|
+
version_module: Version17,
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
@@ -24,8 +24,8 @@ module OpsManagerUiDrivers
|
|
24
24
|
|
25
25
|
def http
|
26
26
|
Net::HTTP.new(@host_uri.host, @host_uri.port).tap do |http|
|
27
|
-
http.use_ssl
|
28
|
-
http.verify_mode
|
27
|
+
http.use_ssl = @host_uri.is_a?(URI::HTTPS)
|
28
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
29
29
|
http.read_timeout = 1800
|
30
30
|
end
|
31
31
|
end
|
@@ -38,12 +38,12 @@ module OpsManagerUiDrivers
|
|
38
38
|
|
39
39
|
def set_openstack_credentials(
|
40
40
|
identity_endpoint:,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
username:,
|
42
|
+
password:,
|
43
|
+
tenant:,
|
44
|
+
security_group_name:,
|
45
|
+
key_pair_name:,
|
46
|
+
ssh_private_key:
|
47
47
|
)
|
48
48
|
set_field('identity_endpoint', identity_endpoint)
|
49
49
|
set_field('username', username)
|
@@ -3,11 +3,11 @@ module OpsManagerUiDrivers
|
|
3
3
|
class JobAvailabilityZoneMappingHelper
|
4
4
|
def initialize(product_name:, browser:)
|
5
5
|
@product_name = product_name
|
6
|
-
@browser
|
6
|
+
@browser = browser
|
7
7
|
end
|
8
8
|
|
9
9
|
SINGLETON_AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[singleton_availability_zone_reference]']"
|
10
|
-
AVAILABILITY_ZONE_INPUT_SELECTOR
|
10
|
+
AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[availability_zone_references][]']"
|
11
11
|
|
12
12
|
def assign_availability_zones!(singleton_availability_zone:, availability_zones:)
|
13
13
|
open_form
|
@@ -12,12 +12,12 @@ module OpsManagerUiDrivers
|
|
12
12
|
browser.click_on 'Add'
|
13
13
|
set_fields(
|
14
14
|
fields: {
|
15
|
-
'name'
|
15
|
+
'name' => name,
|
16
16
|
'iaas_network_identifier' => iaas_network_identifier,
|
17
|
-
'subnet'
|
18
|
-
'dns'
|
19
|
-
'gateway'
|
20
|
-
'reserved_ip_ranges'
|
17
|
+
'subnet' => subnet,
|
18
|
+
'dns' => dns,
|
19
|
+
'gateway' => gateway,
|
20
|
+
'reserved_ip_ranges' => reserved_ip_ranges,
|
21
21
|
}
|
22
22
|
)
|
23
23
|
save_form
|
@@ -8,54 +8,54 @@ module OpsManagerUiDrivers
|
|
8
8
|
def configure_microbosh(test_settings)
|
9
9
|
configure_iaas(test_settings)
|
10
10
|
|
11
|
-
config_director(test_settings.ops_manager)
|
11
|
+
config_director(test_settings.dig('ops_manager'))
|
12
12
|
|
13
|
-
add_azs(test_settings.iaas_type, test_settings.ops_manager
|
13
|
+
add_azs(test_settings.dig('iaas_type'), test_settings.dig('ops_manager', 'availability_zones'))
|
14
14
|
|
15
|
-
assign_availability_zone(test_settings.iaas_type, test_settings.ops_manager
|
15
|
+
assign_availability_zone(test_settings.dig('iaas_type'), test_settings.dig('ops_manager', 'availability_zones'))
|
16
16
|
|
17
17
|
add_networks(test_settings)
|
18
18
|
|
19
|
-
assign_networks(test_settings.ops_manager)
|
19
|
+
assign_networks(test_settings.dig('ops_manager'))
|
20
20
|
end
|
21
21
|
|
22
22
|
def configure_iaas(test_settings)
|
23
|
-
case test_settings.iaas_type
|
23
|
+
case test_settings.dig('iaas_type')
|
24
24
|
when OpsManagerUiDrivers::VCLOUD_IAAS_TYPE then
|
25
25
|
configure_vcloud(
|
26
|
-
vcd_url:
|
27
|
-
organization:
|
28
|
-
user:
|
29
|
-
password:
|
30
|
-
datacenter:
|
31
|
-
storage_profile: test_settings.ops_manager
|
26
|
+
vcd_url: test_settings.dig('ops_manager', 'vcloud', 'creds', 'url'),
|
27
|
+
organization: test_settings.dig('ops_manager', 'vcloud', 'creds', 'organization'),
|
28
|
+
user: test_settings.dig('ops_manager', 'vcloud', 'creds', 'user'),
|
29
|
+
password: test_settings.dig('ops_manager', 'vcloud', 'creds', 'password'),
|
30
|
+
datacenter: test_settings.dig('ops_manager', 'vcloud', 'vdc', 'name'),
|
31
|
+
storage_profile: test_settings.dig('ops_manager', 'vcloud', 'vdc', 'storage_profile'),
|
32
32
|
)
|
33
33
|
when OpsManagerUiDrivers::VSPHERE_IAAS_TYPE then
|
34
34
|
configure_vcenter(
|
35
|
-
ip:
|
36
|
-
username:
|
37
|
-
password:
|
38
|
-
datacenter: test_settings.ops_manager
|
39
|
-
datastores: test_settings.ops_manager
|
35
|
+
ip: test_settings.dig('ops_manager', 'vcenter', 'creds', 'ip'),
|
36
|
+
username: test_settings.dig('ops_manager', 'vcenter', 'creds', 'username'),
|
37
|
+
password: test_settings.dig('ops_manager', 'vcenter', 'creds', 'password'),
|
38
|
+
datacenter: test_settings.dig('ops_manager', 'vcenter', 'datacenter'),
|
39
|
+
datastores: test_settings.dig('ops_manager', 'vcenter', 'persistent_datastore'),
|
40
40
|
)
|
41
41
|
when OpsManagerUiDrivers::AWS_IAAS_TYPE then
|
42
42
|
configure_aws(
|
43
|
-
aws_access_key:
|
44
|
-
aws_secret_key:
|
45
|
-
vpc_id:
|
46
|
-
security_group:
|
47
|
-
key_pair_name:
|
48
|
-
ssh_private_key: test_settings.ops_manager
|
43
|
+
aws_access_key: test_settings.dig('ops_manager', 'aws', 'aws_access_key'),
|
44
|
+
aws_secret_key: test_settings.dig('ops_manager', 'aws', 'aws_secret_key'),
|
45
|
+
vpc_id: test_settings.dig('ops_manager', 'aws', 'vpc_id'),
|
46
|
+
security_group: test_settings.dig('ops_manager', 'aws', 'security_group'),
|
47
|
+
key_pair_name: test_settings.dig('ops_manager', 'aws', 'key_pair_name'),
|
48
|
+
ssh_private_key: test_settings.dig('ops_manager', 'aws', 'ssh_key'),
|
49
49
|
)
|
50
50
|
when OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE then
|
51
51
|
configure_openstack(
|
52
|
-
identity_endpoint:
|
53
|
-
username:
|
54
|
-
password:
|
55
|
-
tenant:
|
56
|
-
security_group_name: test_settings.ops_manager
|
57
|
-
key_pair_name:
|
58
|
-
ssh_private_key:
|
52
|
+
identity_endpoint: test_settings.dig('ops_manager', 'openstack', 'identity_endpoint'),
|
53
|
+
username: test_settings.dig('ops_manager', 'openstack', 'username'),
|
54
|
+
password: test_settings.dig('ops_manager', 'openstack', 'password'),
|
55
|
+
tenant: test_settings.dig('ops_manager', 'openstack', 'tenant'),
|
56
|
+
security_group_name: test_settings.dig('ops_manager', 'openstack', 'security_group_name'),
|
57
|
+
key_pair_name: test_settings.dig('ops_manager', 'openstack', 'key_pair_name'),
|
58
|
+
ssh_private_key: test_settings.dig('ops_manager', 'openstack', 'ssh_private_key'),
|
59
59
|
)
|
60
60
|
end
|
61
61
|
end
|
@@ -95,12 +95,12 @@ module OpsManagerUiDrivers
|
|
95
95
|
else
|
96
96
|
iaas_networks && iaas_networks.each do |network|
|
97
97
|
networks.add_network(
|
98
|
-
name:
|
98
|
+
name: network['name'],
|
99
99
|
iaas_network_identifier: network['identifier'],
|
100
|
-
subnet:
|
101
|
-
reserved_ip_ranges:
|
102
|
-
dns:
|
103
|
-
gateway:
|
100
|
+
subnet: network['subnet'],
|
101
|
+
reserved_ip_ranges: network['reserved_ips'],
|
102
|
+
dns: network['dns'],
|
103
|
+
gateway: network['gateway'],
|
104
104
|
)
|
105
105
|
end
|
106
106
|
end
|
@@ -108,25 +108,25 @@ module OpsManagerUiDrivers
|
|
108
108
|
|
109
109
|
def config_director(ops_manager)
|
110
110
|
browser.click_on 'Director Config'
|
111
|
-
browser.fill_in('director_configuration[ntp_servers_string]', with: ops_manager.ntp_servers)
|
112
|
-
browser.check('Enable VM Resurrector Plugin') if ops_manager.resurrector_enabled
|
111
|
+
browser.fill_in('director_configuration[ntp_servers_string]', with: ops_manager.dig('ntp_servers'))
|
112
|
+
browser.check('Enable VM Resurrector Plugin') if ops_manager.dig('resurrector_enabled')
|
113
113
|
|
114
|
-
s3_blobstore = ops_manager.s3_blobstore
|
114
|
+
s3_blobstore = ops_manager.dig('s3_blobstore')
|
115
115
|
if s3_blobstore
|
116
116
|
browser.choose('Amazon S3')
|
117
|
-
browser.fill_in('director_configuration[amazon_s3_blobstore_options][bucket_name]', with: s3_blobstore.bucket_name)
|
118
|
-
browser.fill_in('director_configuration[amazon_s3_blobstore_options][access_key]', with: s3_blobstore.access_key_id)
|
119
|
-
browser.fill_in('director_configuration[amazon_s3_blobstore_options][secret_key]', with: s3_blobstore.secret_access_key)
|
117
|
+
browser.fill_in('director_configuration[amazon_s3_blobstore_options][bucket_name]', with: s3_blobstore.dig('bucket_name'))
|
118
|
+
browser.fill_in('director_configuration[amazon_s3_blobstore_options][access_key]', with: s3_blobstore.dig('access_key_id'))
|
119
|
+
browser.fill_in('director_configuration[amazon_s3_blobstore_options][secret_key]', with: s3_blobstore.dig('secret_access_key'))
|
120
120
|
end
|
121
121
|
|
122
|
-
mysql = ops_manager.mysql
|
122
|
+
mysql = ops_manager.dig('mysql')
|
123
123
|
if mysql
|
124
124
|
browser.choose('External MySQL Database')
|
125
|
-
browser.fill_in('director_configuration[external_database_options][host]', with: mysql.host)
|
126
|
-
browser.fill_in('director_configuration[external_database_options][port]', with: mysql.port)
|
127
|
-
browser.fill_in('director_configuration[external_database_options][user]', with: mysql.user)
|
128
|
-
browser.fill_in('director_configuration[external_database_options][password]', with: mysql.password)
|
129
|
-
browser.fill_in('director_configuration[external_database_options][database]', with: mysql.dbname)
|
125
|
+
browser.fill_in('director_configuration[external_database_options][host]', with: mysql.dig('host'))
|
126
|
+
browser.fill_in('director_configuration[external_database_options][port]', with: mysql.dig('port'))
|
127
|
+
browser.fill_in('director_configuration[external_database_options][user]', with: mysql.dig('user'))
|
128
|
+
browser.fill_in('director_configuration[external_database_options][password]', with: mysql.dig('password'))
|
129
|
+
browser.fill_in('director_configuration[external_database_options][database]', with: mysql.dig('dbname'))
|
130
130
|
end
|
131
131
|
|
132
132
|
browser.click_on 'Save'
|
@@ -149,17 +149,17 @@ module OpsManagerUiDrivers
|
|
149
149
|
|
150
150
|
def assign_networks(ops_manager)
|
151
151
|
if ops_manager.vcenter
|
152
|
-
deployment_network = ops_manager.networks
|
152
|
+
deployment_network = ops_manager.dig('networks', 0)
|
153
153
|
|
154
154
|
infrastructure_network =
|
155
|
-
ops_manager.networks[1] ? ops_manager.networks
|
155
|
+
ops_manager.networks[1] ? ops_manager.dig('networks', 1) : ops_manager.dig('networks', 0)
|
156
156
|
|
157
157
|
assign_networks_vsphere(
|
158
|
-
deployment_network:
|
158
|
+
deployment_network: deployment_network['name'],
|
159
159
|
infrastructure_network: infrastructure_network['name'],
|
160
160
|
)
|
161
161
|
else
|
162
|
-
assign_network(deployment_network: ops_manager.networks
|
162
|
+
assign_network(deployment_network: ops_manager.dig('networks', 0, 'name'))
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
@@ -206,34 +206,34 @@ module OpsManagerUiDrivers
|
|
206
206
|
def configure_aws(aws_access_key:, aws_secret_key:, vpc_id:, security_group:, key_pair_name:, ssh_private_key:)
|
207
207
|
iaas_configuration.configure_iaas do
|
208
208
|
iaas_configuration.set_aws_credentials(
|
209
|
-
access_key_id:
|
209
|
+
access_key_id: aws_access_key,
|
210
210
|
secret_access_key: aws_secret_key,
|
211
|
-
vpc_id:
|
212
|
-
security_group:
|
213
|
-
key_pair_name:
|
214
|
-
ssh_private_key:
|
211
|
+
vpc_id: vpc_id,
|
212
|
+
security_group: security_group,
|
213
|
+
key_pair_name: key_pair_name,
|
214
|
+
ssh_private_key: ssh_private_key
|
215
215
|
)
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|
219
219
|
def configure_openstack(
|
220
220
|
identity_endpoint:,
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
221
|
+
username:,
|
222
|
+
password:,
|
223
|
+
tenant:,
|
224
|
+
security_group_name:,
|
225
|
+
key_pair_name:,
|
226
|
+
ssh_private_key:
|
227
227
|
)
|
228
228
|
iaas_configuration.configure_iaas do
|
229
229
|
iaas_configuration.set_openstack_credentials(
|
230
|
-
identity_endpoint:
|
231
|
-
username:
|
232
|
-
password:
|
233
|
-
tenant:
|
230
|
+
identity_endpoint: identity_endpoint,
|
231
|
+
username: username,
|
232
|
+
password: password,
|
233
|
+
tenant: tenant,
|
234
234
|
security_group_name: security_group_name,
|
235
|
-
key_pair_name:
|
236
|
-
ssh_private_key:
|
235
|
+
key_pair_name: key_pair_name,
|
236
|
+
ssh_private_key: ssh_private_key
|
237
237
|
)
|
238
238
|
end
|
239
239
|
end
|
@@ -2,9 +2,9 @@ module OpsManagerUiDrivers
|
|
2
2
|
module Version14
|
3
3
|
class ProductForm
|
4
4
|
def initialize(browser:, product_name:, form_name:)
|
5
|
-
@browser
|
5
|
+
@browser = browser
|
6
6
|
@product_name = product_name
|
7
|
-
@form_name
|
7
|
+
@form_name = form_name
|
8
8
|
end
|
9
9
|
|
10
10
|
def property(property_reference)
|
@@ -19,7 +19,7 @@ module OpsManagerUiDrivers
|
|
19
19
|
def errand_ran_with_text?(errand_name)
|
20
20
|
{
|
21
21
|
errand_ran: errand_ran?(errand_name),
|
22
|
-
output:
|
22
|
+
output: browser.find('#install-output .output', visible: false).text(:all),
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
@@ -55,17 +55,17 @@ module OpsManagerUiDrivers
|
|
55
55
|
def assign_availability_zones_for_product(product:, zones:)
|
56
56
|
if zones
|
57
57
|
Version14::JobAvailabilityZoneMappingHelper.new(
|
58
|
-
browser:
|
58
|
+
browser: browser,
|
59
59
|
product_name: product,
|
60
60
|
).assign_availability_zones!(
|
61
61
|
singleton_availability_zone: zones[0]['name'],
|
62
|
-
availability_zones:
|
62
|
+
availability_zones: zones.map { |z| z['name'] },
|
63
63
|
)
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
67
|
def current_time
|
68
|
-
uri
|
68
|
+
uri = URI(Capybara.app_host)
|
69
69
|
uri.path = '/'
|
70
70
|
Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https'), verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
|
71
71
|
response = http.request(Net::HTTP::Get.new(uri))
|
@@ -3,11 +3,11 @@ module OpsManagerUiDrivers
|
|
3
3
|
class JobAvailabilityZoneMappingHelper
|
4
4
|
def initialize(product_name:, browser:)
|
5
5
|
@product_name = product_name
|
6
|
-
@browser
|
6
|
+
@browser = browser
|
7
7
|
end
|
8
8
|
|
9
9
|
SINGLETON_AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[singleton_availability_zone_reference]']"
|
10
|
-
AVAILABILITY_ZONE_INPUT_SELECTOR
|
10
|
+
AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[availability_zone_references][]']"
|
11
11
|
|
12
12
|
def assign_availability_zones!(singleton_availability_zone:, availability_zones:)
|
13
13
|
open_form
|
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
|
|
3
3
|
module MicroboshSections
|
4
4
|
class Networks
|
5
5
|
def initialize(browser:)
|
6
|
-
@browser
|
6
|
+
@browser = browser
|
7
7
|
@microbosh_form_section = MicroboshFormSection.new(browser, 'network[networks][]')
|
8
8
|
end
|
9
9
|
|
@@ -11,12 +11,12 @@ module OpsManagerUiDrivers
|
|
11
11
|
@microbosh_form_section.open_form('network')
|
12
12
|
|
13
13
|
@microbosh_form_section.set_fields(
|
14
|
-
'name'
|
14
|
+
'name' => name,
|
15
15
|
'iaas_network_identifier' => iaas_network_identifier,
|
16
|
-
'subnet'
|
17
|
-
'dns'
|
18
|
-
'gateway'
|
19
|
-
'reserved_ip_ranges'
|
16
|
+
'subnet' => subnet,
|
17
|
+
'dns' => dns,
|
18
|
+
'gateway' => gateway,
|
19
|
+
'reserved_ip_ranges' => reserved_ip_ranges,
|
20
20
|
)
|
21
21
|
browser.click_on 'Save'
|
22
22
|
flash_errors = browser.all('.flash-message.error ul.message li').to_a
|
@@ -32,12 +32,12 @@ module OpsManagerUiDrivers
|
|
32
32
|
|
33
33
|
browser.click_on 'Add'
|
34
34
|
@microbosh_form_section.set_fields(
|
35
|
-
'name'
|
35
|
+
'name' => name,
|
36
36
|
'iaas_network_identifier' => iaas_network_identifier,
|
37
|
-
'subnet'
|
38
|
-
'dns'
|
39
|
-
'gateway'
|
40
|
-
'reserved_ip_ranges'
|
37
|
+
'subnet' => subnet,
|
38
|
+
'dns' => dns,
|
39
|
+
'gateway' => gateway,
|
40
|
+
'reserved_ip_ranges' => reserved_ip_ranges,
|
41
41
|
)
|
42
42
|
@microbosh_form_section.save_form
|
43
43
|
end
|
@@ -9,23 +9,23 @@ module OpsManagerUiDrivers
|
|
9
9
|
def configure_bosh_product(test_settings)
|
10
10
|
configure_iaas(test_settings)
|
11
11
|
|
12
|
-
config_director(test_settings.ops_manager)
|
12
|
+
config_director(test_settings.dig('ops_manager'))
|
13
13
|
|
14
|
-
add_availability_zones(test_settings.iaas_type, test_settings.ops_manager
|
14
|
+
add_availability_zones(test_settings.dig('iaas_type'), test_settings.dig('ops_manager', 'availability_zones'))
|
15
15
|
|
16
|
-
assign_availability_zone(test_settings.iaas_type, test_settings.ops_manager
|
16
|
+
assign_availability_zone(test_settings.dig('iaas_type'), test_settings.dig('ops_manager', 'availability_zones'))
|
17
17
|
|
18
18
|
add_networks(test_settings)
|
19
19
|
|
20
|
-
assign_networks(test_settings.ops_manager)
|
20
|
+
assign_networks(test_settings.dig('ops_manager'))
|
21
21
|
end
|
22
22
|
|
23
23
|
def configure_iaas(test_settings)
|
24
24
|
iaas_settings = Settings.for(test_settings)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
iaas_configuration.fill_iaas_settings(iaas_settings.iaas_configuration_fields)
|
26
|
+
advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(
|
27
|
+
iaas_settings.advanced_infrastructure_config_fields
|
28
|
+
)
|
29
29
|
end
|
30
30
|
|
31
31
|
def add_availability_zones(iaas_type, iaas_availability_zones)
|
@@ -41,9 +41,9 @@ module OpsManagerUiDrivers
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def add_networks(test_settings)
|
44
|
-
iaas_networks = test_settings.ops_manager
|
44
|
+
iaas_networks = test_settings.dig('ops_manager', 'networks')
|
45
45
|
|
46
|
-
case test_settings.iaas_type
|
46
|
+
case test_settings.dig('iaas_type')
|
47
47
|
when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE
|
48
48
|
first_network = iaas_networks.first
|
49
49
|
|