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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +0 -2
  4. data/lib/ops_manager_ui_drivers/page_helpers.rb +8 -8
  5. data/lib/ops_manager_ui_drivers/version.rb +1 -1
  6. data/lib/ops_manager_ui_drivers/version14/api.rb +2 -2
  7. data/lib/ops_manager_ui_drivers/version14/availability_zones.rb +2 -2
  8. data/lib/ops_manager_ui_drivers/version14/iaas_configuration.rb +6 -6
  9. data/lib/ops_manager_ui_drivers/version14/job_availability_zone_mapping_helper.rb +2 -2
  10. data/lib/ops_manager_ui_drivers/version14/job_network_mapping_helper.rb +1 -1
  11. data/lib/ops_manager_ui_drivers/version14/job_status_helper.rb +1 -1
  12. data/lib/ops_manager_ui_drivers/version14/networks.rb +5 -5
  13. data/lib/ops_manager_ui_drivers/version14/ops_manager_director.rb +67 -67
  14. data/lib/ops_manager_ui_drivers/version14/product_configuration.rb +1 -1
  15. data/lib/ops_manager_ui_drivers/version14/product_dashboard.rb +1 -1
  16. data/lib/ops_manager_ui_drivers/version14/product_form.rb +2 -2
  17. data/lib/ops_manager_ui_drivers/version14/product_logs.rb +1 -1
  18. data/lib/ops_manager_ui_drivers/version14/product_resource_configuration.rb +1 -1
  19. data/lib/ops_manager_ui_drivers/version14/product_status_helper.rb +1 -1
  20. data/lib/ops_manager_ui_drivers/version14/state_change_progress.rb +1 -1
  21. data/lib/ops_manager_ui_drivers/version14/web_ui.rb +3 -3
  22. data/lib/ops_manager_ui_drivers/version15/job_availability_zone_mapping_helper.rb +2 -2
  23. data/lib/ops_manager_ui_drivers/version15/job_network_mapping_helper.rb +1 -1
  24. data/lib/ops_manager_ui_drivers/version15/job_status_helper.rb +1 -1
  25. data/lib/ops_manager_ui_drivers/version15/microbosh_sections/availability_zones.rb +1 -1
  26. data/lib/ops_manager_ui_drivers/version15/microbosh_sections/microbosh_form_section.rb +1 -1
  27. data/lib/ops_manager_ui_drivers/version15/microbosh_sections/networks.rb +11 -11
  28. data/lib/ops_manager_ui_drivers/version15/ops_manager_director.rb +10 -10
  29. data/lib/ops_manager_ui_drivers/version15/product_availability_zones.rb +1 -1
  30. data/lib/ops_manager_ui_drivers/version15/product_configuration.rb +1 -1
  31. data/lib/ops_manager_ui_drivers/version15/product_errands.rb +1 -1
  32. data/lib/ops_manager_ui_drivers/version15/product_form.rb +2 -2
  33. data/lib/ops_manager_ui_drivers/version15/product_logs.rb +1 -1
  34. data/lib/ops_manager_ui_drivers/version15/product_resource_configuration.rb +1 -1
  35. data/lib/ops_manager_ui_drivers/version15/product_status_helper.rb +1 -1
  36. data/lib/ops_manager_ui_drivers/version15/settings.rb +40 -38
  37. data/lib/ops_manager_ui_drivers/version15/state_change_progress.rb +1 -1
  38. data/lib/ops_manager_ui_drivers/version15/web_ui.rb +3 -3
  39. data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/availability_zones.rb +1 -1
  40. data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/bosh_product_form_section.rb +1 -1
  41. data/lib/ops_manager_ui_drivers/version16/bosh_product_sections/networks.rb +11 -11
  42. data/lib/ops_manager_ui_drivers/version16/job_availability_zone_mapping_helper.rb +2 -2
  43. data/lib/ops_manager_ui_drivers/version16/job_network_mapping_helper.rb +1 -1
  44. data/lib/ops_manager_ui_drivers/version16/job_status_helper.rb +1 -1
  45. data/lib/ops_manager_ui_drivers/version16/ops_manager_director.rb +8 -8
  46. data/lib/ops_manager_ui_drivers/version16/product_availability_zones.rb +1 -1
  47. data/lib/ops_manager_ui_drivers/version16/product_configuration.rb +1 -1
  48. data/lib/ops_manager_ui_drivers/version16/product_dashboard.rb +1 -1
  49. data/lib/ops_manager_ui_drivers/version16/product_errands.rb +1 -1
  50. data/lib/ops_manager_ui_drivers/version16/product_form.rb +2 -2
  51. data/lib/ops_manager_ui_drivers/version16/product_logs.rb +1 -1
  52. data/lib/ops_manager_ui_drivers/version16/product_resource_configuration.rb +1 -1
  53. data/lib/ops_manager_ui_drivers/version16/product_status_helper.rb +1 -1
  54. data/lib/ops_manager_ui_drivers/version16/settings.rb +41 -39
  55. data/lib/ops_manager_ui_drivers/version16/state_change_progress.rb +1 -1
  56. data/lib/ops_manager_ui_drivers/version16/web_ui.rb +3 -3
  57. data/lib/ops_manager_ui_drivers/version17/api.rb +1 -1
  58. data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/availability_zones.rb +1 -1
  59. data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section.rb +2 -2
  60. data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/networks.rb +2 -2
  61. data/lib/ops_manager_ui_drivers/version17/bosh_product_sections/subnet.rb +6 -6
  62. data/lib/ops_manager_ui_drivers/version17/job_az_and_network_mapping_helper.rb +3 -3
  63. data/lib/ops_manager_ui_drivers/version17/job_network_mapping_helper.rb +1 -1
  64. data/lib/ops_manager_ui_drivers/version17/job_status_helper.rb +1 -1
  65. data/lib/ops_manager_ui_drivers/version17/ops_manager_director.rb +21 -21
  66. data/lib/ops_manager_ui_drivers/version17/product_availability_zones.rb +1 -1
  67. data/lib/ops_manager_ui_drivers/version17/product_configuration.rb +1 -1
  68. data/lib/ops_manager_ui_drivers/version17/product_dashboard.rb +4 -0
  69. data/lib/ops_manager_ui_drivers/version17/product_errands.rb +1 -1
  70. data/lib/ops_manager_ui_drivers/version17/product_form.rb +2 -2
  71. data/lib/ops_manager_ui_drivers/version17/product_logs.rb +1 -1
  72. data/lib/ops_manager_ui_drivers/version17/product_resource_configuration.rb +1 -1
  73. data/lib/ops_manager_ui_drivers/version17/product_status_helper.rb +1 -1
  74. data/lib/ops_manager_ui_drivers/version17/settings.rb +42 -40
  75. data/lib/ops_manager_ui_drivers/version17/setup.rb +10 -0
  76. data/lib/ops_manager_ui_drivers/version17/state_change_progress.rb +1 -1
  77. data/lib/ops_manager_ui_drivers/version17/web_ui.rb +4 -4
  78. data/lib/ops_manager_ui_drivers.rb +3 -3
  79. data/ops_manager_ui_drivers.gemspec +7 -8
  80. metadata +2 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c3e8d80d40f40160008003661e7fc4400a01219
4
- data.tar.gz: 567ed168615445d58b2bb3858ddf284811e0a411
3
+ metadata.gz: e7286d612b2128a4a6b9366524759bac3548e38c
4
+ data.tar.gz: c48113714c723739253939906847a06900159360
5
5
  SHA512:
6
- metadata.gz: 3a708509d0dba808050ab24fe95247eb2dcd75eb6f0cd7a6433cb4e850f3252fa991304f4b3d4f8a5cde5c0aa0087f0deb0aebd594bb2b37a9932ef569761e38
7
- data.tar.gz: cf6905feda4cf9cb3e0d7bc17a2d15b5cc7ca2fdda1f41136f3d3a9b23728fd7bb3621c5501be140307ec83b47bb01742e8386d70b0cc24d2b18c74c24a63bdb
6
+ metadata.gz: ef1f9389c7e24a0d48024e3c4b64687974017701da651cc2c6fe547ae49b728661969ff5f48ee208f16ac1012dd5af5bbe08cce6b06b5f4bb02b7ef3fe60c045
7
+ data.tar.gz: 3b5c711c002780cab1738977b107291c636c02c607df8a8f8228eccb21ddda93f684ad432a8b8d3e004fc9bea5c438a7d6bd471cf49e2fbce4f3fbef904c3e12
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.3.0
data/.travis.yml CHANGED
@@ -1,3 +1 @@
1
1
  language: ruby
2
- rvm:
3
- - 2.2.2
@@ -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: browser,
11
- version_module: Version14,
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: browser,
19
- version_module: Version15,
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: browser,
27
- version_module: Version16,
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: browser,
35
- version_module: Version17,
34
+ browser: browser,
35
+ version_module: Version17,
36
36
  )
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '1.28.1'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -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 = @host_uri.is_a?(URI::HTTPS)
28
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
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
@@ -19,8 +19,8 @@ module OpsManagerUiDrivers
19
19
  browser.click_on 'Add'
20
20
  set_fields(
21
21
  fields: {
22
- 'name' => name,
23
- 'cluster' => cluster,
22
+ 'name' => name,
23
+ 'cluster' => cluster,
24
24
  'resource_pool' => resource_pool,
25
25
  }
26
26
  )
@@ -38,12 +38,12 @@ module OpsManagerUiDrivers
38
38
 
39
39
  def set_openstack_credentials(
40
40
  identity_endpoint:,
41
- username:,
42
- password:,
43
- tenant:,
44
- security_group_name:,
45
- key_pair_name:,
46
- ssh_private_key:
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 = 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 = "input[name='product[availability_zone_references][]']"
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
@@ -5,7 +5,7 @@ module OpsManagerUiDrivers
5
5
 
6
6
  def initialize(product_name:, browser:)
7
7
  @product_name = product_name
8
- @browser = browser
8
+ @browser = browser
9
9
  end
10
10
 
11
11
  def assign_product_to_network(network)
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  class JobStatusHelper
4
4
  def self.from_job_row(job_row)
5
5
  ips_string = job_row.find('.actual-ips').text
6
- ips = ips_string.split(', ')
6
+ ips = ips_string.split(', ')
7
7
  new(ips: ips)
8
8
  end
9
9
 
@@ -12,12 +12,12 @@ module OpsManagerUiDrivers
12
12
  browser.click_on 'Add'
13
13
  set_fields(
14
14
  fields: {
15
- 'name' => name,
15
+ 'name' => name,
16
16
  'iaas_network_identifier' => iaas_network_identifier,
17
- 'subnet' => subnet,
18
- 'dns' => dns,
19
- 'gateway' => gateway,
20
- 'reserved_ip_ranges' => 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.availability_zones)
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.availability_zones)
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: test_settings.ops_manager.vcloud.creds.url,
27
- organization: test_settings.ops_manager.vcloud.creds.organization,
28
- user: test_settings.ops_manager.vcloud.creds.user,
29
- password: test_settings.ops_manager.vcloud.creds.password,
30
- datacenter: test_settings.ops_manager.vcloud.vdc.name,
31
- storage_profile: test_settings.ops_manager.vcloud.vdc.storage_profile,
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: test_settings.ops_manager.vcenter.creds.ip,
36
- username: test_settings.ops_manager.vcenter.creds.username,
37
- password: test_settings.ops_manager.vcenter.creds.password,
38
- datacenter: test_settings.ops_manager.vcenter.datacenter,
39
- datastores: test_settings.ops_manager.vcenter.persistent_datastore,
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: test_settings.ops_manager.aws.aws_access_key,
44
- aws_secret_key: test_settings.ops_manager.aws.aws_secret_key,
45
- vpc_id: test_settings.ops_manager.aws.vpc_id,
46
- security_group: test_settings.ops_manager.aws.security_group,
47
- key_pair_name: test_settings.ops_manager.aws.key_pair_name,
48
- ssh_private_key: test_settings.ops_manager.aws.ssh_key
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: test_settings.ops_manager.openstack.identity_endpoint,
53
- username: test_settings.ops_manager.openstack.username,
54
- password: test_settings.ops_manager.openstack.password,
55
- tenant: test_settings.ops_manager.openstack.tenant,
56
- security_group_name: test_settings.ops_manager.openstack.security_group_name,
57
- key_pair_name: test_settings.ops_manager.openstack.key_pair_name,
58
- ssh_private_key: test_settings.ops_manager.openstack.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: network['name'],
98
+ name: network['name'],
99
99
  iaas_network_identifier: network['identifier'],
100
- subnet: network['subnet'],
101
- reserved_ip_ranges: network['reserved_ips'],
102
- dns: network['dns'],
103
- gateway: network['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[0]
152
+ deployment_network = ops_manager.dig('networks', 0)
153
153
 
154
154
  infrastructure_network =
155
- ops_manager.networks[1] ? ops_manager.networks[1] : ops_manager.networks[0]
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: deployment_network['name'],
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[0]['name'])
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: aws_access_key,
209
+ access_key_id: aws_access_key,
210
210
  secret_access_key: aws_secret_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
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
- username:,
222
- password:,
223
- tenant:,
224
- security_group_name:,
225
- key_pair_name:,
226
- ssh_private_key:
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: identity_endpoint,
231
- username: username,
232
- password: password,
233
- tenant: 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: key_pair_name,
236
- ssh_private_key: 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
@@ -4,7 +4,7 @@ module OpsManagerUiDrivers
4
4
  attr_reader :product_name
5
5
 
6
6
  def initialize(browser:, product_name:)
7
- @browser = browser
7
+ @browser = browser
8
8
  @product_name = product_name
9
9
  end
10
10
 
@@ -2,7 +2,7 @@ module OpsManagerUiDrivers
2
2
  module Version14
3
3
  class ProductDashboard
4
4
  def initialize(browser:)
5
- @browser = browser
5
+ @browser = browser
6
6
  @allowed_ignorable_errors = []
7
7
  end
8
8
 
@@ -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 = browser
5
+ @browser = browser
6
6
  @product_name = product_name
7
- @form_name = form_name
7
+ @form_name = form_name
8
8
  end
9
9
 
10
10
  def property(property_reference)
@@ -4,7 +4,7 @@ module OpsManagerUiDrivers
4
4
  module Version14
5
5
  class ProductLogs
6
6
  def initialize(browser:, product_name:)
7
- @browser = browser
7
+ @browser = browser
8
8
  @product_name = product_name
9
9
  end
10
10
 
@@ -4,7 +4,7 @@ module OpsManagerUiDrivers
4
4
  attr_reader :product_name
5
5
 
6
6
  def initialize(browser:, product_name:)
7
- @browser = browser
7
+ @browser = browser
8
8
  @product_name = product_name
9
9
  end
10
10
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  class ProductStatusHelper
4
4
  def initialize(product_name:, browser:)
5
5
  @product_name = product_name
6
- @browser = browser
6
+ @browser = browser
7
7
  end
8
8
 
9
9
  def job_status(job_name)
@@ -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: browser.find('#install-output .output', visible: false).text(:all),
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: 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: zones.map { |z| z['name'] },
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 = URI(Capybara.app_host)
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 = 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 = "input[name='product[availability_zone_references][]']"
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
@@ -5,7 +5,7 @@ module OpsManagerUiDrivers
5
5
 
6
6
  def initialize(product_name:, browser:)
7
7
  @product_name = product_name
8
- @browser = browser
8
+ @browser = browser
9
9
  end
10
10
 
11
11
  def assign_product_to_network(network)
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  class JobStatusHelper
4
4
  def self.from_job_row(job_row)
5
5
  ips_string = job_row.find('.actual-ips').text
6
- ips = ips_string.split(', ')
6
+ ips = ips_string.split(', ')
7
7
  new(ips: ips)
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  module MicroboshSections
4
4
  class AvailabilityZones
5
5
  def initialize(browser:)
6
- @browser = browser
6
+ @browser = browser
7
7
  @microbosh_form_section = MicroboshFormSection.new(browser, 'availability_zones[availability_zones][]')
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  module MicroboshSections
4
4
  class MicroboshFormSection
5
5
  def initialize(browser, field_prefix)
6
- @browser = browser
6
+ @browser = browser
7
7
  @field_prefix = field_prefix
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  module MicroboshSections
4
4
  class Networks
5
5
  def initialize(browser:)
6
- @browser = 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' => name,
14
+ 'name' => name,
15
15
  'iaas_network_identifier' => iaas_network_identifier,
16
- 'subnet' => subnet,
17
- 'dns' => dns,
18
- 'gateway' => gateway,
19
- 'reserved_ip_ranges' => 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' => name,
35
+ 'name' => name,
36
36
  'iaas_network_identifier' => iaas_network_identifier,
37
- 'subnet' => subnet,
38
- 'dns' => dns,
39
- 'gateway' => gateway,
40
- 'reserved_ip_ranges' => 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.availability_zones)
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.availability_zones)
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
- iaas_specific_fields = iaas_settings.iaas_configuration_fields
26
- advanced_infrastructure_config_fields = iaas_settings.advanced_infrastructure_config_fields
27
- iaas_configuration.fill_iaas_settings(iaas_specific_fields)
28
- advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(advanced_infrastructure_config_fields)
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.networks
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
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  class WebUi
4
4
  class ProductAvailabilityZones
5
5
  def initialize(browser:, product_name:)
6
- @browser = browser
6
+ @browser = browser
7
7
  @product_name = product_name
8
8
  end
9
9