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
@@ -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 Version15
3
3
  class ProductErrands
4
4
  def initialize(browser:, product_name:)
5
- @browser = browser
5
+ @browser = browser
6
6
  @product_name = product_name
7
7
  end
8
8
 
@@ -2,9 +2,9 @@ module OpsManagerUiDrivers
2
2
  module Version15
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 Version15
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)
@@ -2,9 +2,11 @@ module OpsManagerUiDrivers
2
2
  module Version15
3
3
  module Settings
4
4
  def self.for(test_settings)
5
- settings_class = [Vcloud, Vsphere, AWS, OpenStack].find do |klass|
6
- klass.works_with?(test_settings.iaas_type)
7
- end or raise("Unsupported IaaS: #{test_settings.iaas_type.inspect}")
5
+ iaas_type = test_settings.dig('iaas_type')
6
+ settings_class =
7
+ [Vcloud, Vsphere, AWS, OpenStack].find do |klass|
8
+ klass.works_with?(iaas_type)
9
+ end or fail("Unsupported IaaS: #{iaas_type.inspect}")
8
10
  settings_class.new(test_settings)
9
11
  end
10
12
 
@@ -19,18 +21,18 @@ module OpsManagerUiDrivers
19
21
 
20
22
  def iaas_configuration_fields
21
23
  {
22
- 'vcd_url' => test_settings.ops_manager.vcloud.creds.url,
23
- 'organization' => test_settings.ops_manager.vcloud.creds.organization,
24
- 'vcd_username' => test_settings.ops_manager.vcloud.creds.user,
25
- 'vcd_password' => test_settings.ops_manager.vcloud.creds.password,
26
- 'datacenter' => test_settings.ops_manager.vcloud.vdc.name,
27
- 'storage_profile' => test_settings.ops_manager.vcloud.vdc.storage_profile,
28
- 'catalog_name' => test_settings.ops_manager.vcloud.vdc.catalog_name,
24
+ 'vcd_url' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'url'),
25
+ 'organization' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'organization'),
26
+ 'vcd_username' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'user'),
27
+ 'vcd_password' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'password'),
28
+ 'datacenter' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'name'),
29
+ 'storage_profile' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'storage_profile'),
30
+ 'catalog_name' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'catalog_name'),
29
31
  }
30
32
  end
31
33
 
32
34
  def advanced_infrastructure_config_fields
33
- { }
35
+ {}
34
36
  end
35
37
 
36
38
  private
@@ -49,19 +51,19 @@ module OpsManagerUiDrivers
49
51
 
50
52
  def iaas_configuration_fields
51
53
  {
52
- 'vcenter_ip' => test_settings.ops_manager.vcenter.creds.ip,
53
- 'vcenter_username' => test_settings.ops_manager.vcenter.creds.username,
54
- 'vcenter_password' => test_settings.ops_manager.vcenter.creds.password,
55
- 'datacenter' => test_settings.ops_manager.vcenter.datacenter,
56
- 'datastores_string' => test_settings.ops_manager.vcenter.persistent_datastore,
57
- 'microbosh_vm_folder' => test_settings.ops_manager.vcenter.bosh_vm_folder,
58
- 'microbosh_template_folder' => test_settings.ops_manager.vcenter.bosh_template_folder,
59
- 'microbosh_disk_path' => test_settings.ops_manager.vcenter.bosh_disk_path,
54
+ 'vcenter_ip' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'ip'),
55
+ 'vcenter_username' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'username'),
56
+ 'vcenter_password' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'password'),
57
+ 'datacenter' => test_settings.dig('ops_manager', 'vcenter', 'datacenter'),
58
+ 'datastores_string' => test_settings.dig('ops_manager', 'vcenter', 'persistent_datastore'),
59
+ 'microbosh_vm_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_vm_folder'),
60
+ 'microbosh_template_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_template_folder'),
61
+ 'microbosh_disk_path' => test_settings.dig('ops_manager', 'vcenter', 'bosh_disk_path'),
60
62
  }
61
63
  end
62
64
 
63
65
  def advanced_infrastructure_config_fields
64
- { }
66
+ {}
65
67
  end
66
68
 
67
69
  private
@@ -80,18 +82,18 @@ module OpsManagerUiDrivers
80
82
 
81
83
  def iaas_configuration_fields
82
84
  {
83
- 'access_key_id' => test_settings.ops_manager.aws.aws_access_key,
84
- 'secret_access_key' => test_settings.ops_manager.aws.aws_secret_key,
85
- 'vpc_id' => test_settings.ops_manager.aws.vpc_id,
86
- 'security_group' => test_settings.ops_manager.aws.security_group,
87
- 'key_pair_name' => test_settings.ops_manager.aws.key_pair_name,
88
- 'ssh_private_key' => test_settings.ops_manager.aws.ssh_key,
89
- 'region' => test_settings.ops_manager.aws.region,
85
+ 'access_key_id' => test_settings.dig('ops_manager', 'aws', 'aws_access_key'),
86
+ 'secret_access_key' => test_settings.dig('ops_manager', 'aws', 'aws_secret_key'),
87
+ 'vpc_id' => test_settings.dig('ops_manager', 'aws', 'vpc_id'),
88
+ 'security_group' => test_settings.dig('ops_manager', 'aws', 'security_group'),
89
+ 'key_pair_name' => test_settings.dig('ops_manager', 'aws', 'key_pair_name'),
90
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'aws', 'ssh_key'),
91
+ 'region' => test_settings.dig('ops_manager', 'aws', 'region'),
90
92
  }
91
93
  end
92
94
 
93
95
  def advanced_infrastructure_config_fields
94
- { }
96
+ {}
95
97
  end
96
98
 
97
99
  private
@@ -110,20 +112,20 @@ module OpsManagerUiDrivers
110
112
 
111
113
  def iaas_configuration_fields
112
114
  {
113
- 'identity_endpoint' => test_settings.ops_manager.openstack.identity_endpoint,
114
- 'username' => test_settings.ops_manager.openstack.username,
115
- 'password' => test_settings.ops_manager.openstack.password,
116
- 'tenant' => test_settings.ops_manager.openstack.tenant,
117
- 'security_group' => test_settings.ops_manager.openstack.security_group_name,
118
- 'key_pair_name' => test_settings.ops_manager.openstack.key_pair_name,
119
- 'ssh_private_key' => test_settings.ops_manager.openstack.ssh_private_key,
120
- 'region' => test_settings.ops_manager.openstack.region,
121
- 'disable_dhcp' => test_settings.ops_manager.openstack.disable_dhcp,
115
+ 'identity_endpoint' => test_settings.dig('ops_manager', 'openstack', 'identity_endpoint'),
116
+ 'username' => test_settings.dig('ops_manager', 'openstack', 'username'),
117
+ 'password' => test_settings.dig('ops_manager', 'openstack', 'password'),
118
+ 'tenant' => test_settings.dig('ops_manager', 'openstack', 'tenant'),
119
+ 'security_group' => test_settings.dig('ops_manager', 'openstack', 'security_group_name'),
120
+ 'key_pair_name' => test_settings.dig('ops_manager', 'openstack', 'key_pair_name'),
121
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'openstack', 'ssh_private_key'),
122
+ 'region' => test_settings.dig('ops_manager', 'openstack', 'region'),
123
+ 'disable_dhcp' => test_settings.dig('ops_manager', 'openstack', 'disable_dhcp'),
122
124
  }
123
125
  end
124
126
 
125
127
  def advanced_infrastructure_config_fields
126
- { 'connection_options' => test_settings.ops_manager.openstack.connection_options }
128
+ {'connection_options' => test_settings.dig('ops_manager', 'openstack', 'connection_options')}
127
129
  end
128
130
 
129
131
  private
@@ -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,11 +55,11 @@ module OpsManagerUiDrivers
55
55
  def assign_availability_zones_for_product(product:, zones:)
56
56
  if zones
57
57
  Version15::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
@@ -70,7 +70,7 @@ module OpsManagerUiDrivers
70
70
  end
71
71
 
72
72
  def current_time
73
- uri = URI(Capybara.app_host)
73
+ uri = URI(Capybara.app_host)
74
74
  uri.path = '/'
75
75
  Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https'), verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
76
76
  response = http.request(Net::HTTP::Get.new(uri))
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  module BoshProductSections
4
4
  class AvailabilityZones
5
5
  def initialize(browser:)
6
- @browser = browser
6
+ @browser = browser
7
7
  @bosh_product_form_section = BoshProductFormSection.new(browser, 'availability_zones[availability_zones][]')
8
8
  end
9
9
 
@@ -3,7 +3,7 @@ module OpsManagerUiDrivers
3
3
  module BoshProductSections
4
4
  class BoshProductFormSection
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 BoshProductSections
4
4
  class Networks
5
5
  def initialize(browser:)
6
- @browser = browser
6
+ @browser = browser
7
7
  @bosh_product_form_section = BoshProductFormSection.new(browser, 'network[networks][]')
8
8
  end
9
9
 
@@ -11,12 +11,12 @@ module OpsManagerUiDrivers
11
11
  @bosh_product_form_section.open_form('network')
12
12
 
13
13
  @bosh_product_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
  @bosh_product_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
  @bosh_product_form_section.save_form
43
43
  end
@@ -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
 
@@ -9,22 +9,22 @@ 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
 
22
- configure_experimental_features(test_settings.ops_manager.experimental_features)
22
+ configure_experimental_features(test_settings.dig('ops_manager', 'experimental_features'))
23
23
  end
24
24
 
25
25
  def configure_iaas(test_settings)
26
- iaas_settings = Settings.for(test_settings)
27
- iaas_specific_fields = iaas_settings.iaas_configuration_fields
26
+ iaas_settings = Settings.for(test_settings)
27
+ iaas_specific_fields = iaas_settings.iaas_configuration_fields
28
28
  advanced_infrastructure_config_fields = iaas_settings.advanced_infrastructure_config_fields
29
29
  iaas_configuration.fill_iaas_settings(iaas_specific_fields)
30
30
  advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(advanced_infrastructure_config_fields)
@@ -160,7 +160,7 @@ module OpsManagerUiDrivers
160
160
  def configure_experimental_features(experimental_features)
161
161
  browser.click_on 'Experimental Features'
162
162
 
163
- trusted_certificates = experimental_features ? experimental_features.trusted_certificates : ''
163
+ trusted_certificates = experimental_features ? experimental_features.dig('trusted_certificates') : ''
164
164
 
165
165
  browser.fill_in('experimental_features[trusted_certificates]', with: trusted_certificates)
166
166
  browser.click_on 'Save'
@@ -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
 
@@ -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
 
@@ -4,7 +4,7 @@ module OpsManagerUiDrivers
4
4
  module Version16
5
5
  class ProductDashboard < Version15::ProductDashboard
6
6
  def upgrade_microbosh
7
- fail('No longer implemented in this version')
7
+ fail('No longer implemented in this version')
8
8
  end
9
9
  end
10
10
  end
@@ -2,7 +2,7 @@ module OpsManagerUiDrivers
2
2
  module Version16
3
3
  class ProductErrands
4
4
  def initialize(browser:, product_name:)
5
- @browser = browser
5
+ @browser = browser
6
6
  @product_name = product_name
7
7
  end
8
8
 
@@ -2,9 +2,9 @@ module OpsManagerUiDrivers
2
2
  module Version16
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 Version16
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)
@@ -2,9 +2,11 @@ module OpsManagerUiDrivers
2
2
  module Version16
3
3
  module Settings
4
4
  def self.for(test_settings)
5
- settings_class = [Vcloud, Vsphere, AWS, OpenStack].find do |klass|
6
- klass.works_with?(test_settings.iaas_type)
7
- end or raise("Unsupported IaaS: #{test_settings.iaas_type.inspect}")
5
+ iaas_type = test_settings.dig('iaas_type')
6
+ settings_class =
7
+ [Vcloud, Vsphere, AWS, OpenStack].find do |klass|
8
+ klass.works_with?(iaas_type)
9
+ end or fail("Unsupported IaaS: #{iaas_type.inspect}")
8
10
  settings_class.new(test_settings)
9
11
  end
10
12
 
@@ -19,18 +21,18 @@ module OpsManagerUiDrivers
19
21
 
20
22
  def iaas_configuration_fields
21
23
  {
22
- 'vcd_url' => test_settings.ops_manager.vcloud.creds.url,
23
- 'organization' => test_settings.ops_manager.vcloud.creds.organization,
24
- 'vcd_username' => test_settings.ops_manager.vcloud.creds.user,
25
- 'vcd_password' => test_settings.ops_manager.vcloud.creds.password,
26
- 'datacenter' => test_settings.ops_manager.vcloud.vdc.name,
27
- 'storage_profile' => test_settings.ops_manager.vcloud.vdc.storage_profile,
28
- 'catalog_name' => test_settings.ops_manager.vcloud.vdc.catalog_name,
24
+ 'vcd_url' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'url'),
25
+ 'organization' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'organization'),
26
+ 'vcd_username' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'user'),
27
+ 'vcd_password' => test_settings.dig('ops_manager', 'vcloud', 'creds', 'password'),
28
+ 'datacenter' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'name'),
29
+ 'storage_profile' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'storage_profile'),
30
+ 'catalog_name' => test_settings.dig('ops_manager', 'vcloud', 'vdc', 'catalog_name'),
29
31
  }
30
32
  end
31
33
 
32
34
  def advanced_infrastructure_config_fields
33
- { }
35
+ {}
34
36
  end
35
37
 
36
38
  private
@@ -49,19 +51,19 @@ module OpsManagerUiDrivers
49
51
 
50
52
  def iaas_configuration_fields
51
53
  {
52
- 'vcenter_ip' => test_settings.ops_manager.vcenter.creds.ip,
53
- 'vcenter_username' => test_settings.ops_manager.vcenter.creds.username,
54
- 'vcenter_password' => test_settings.ops_manager.vcenter.creds.password,
55
- 'datacenter' => test_settings.ops_manager.vcenter.datacenter,
56
- 'datastores_string' => test_settings.ops_manager.vcenter.persistent_datastore,
57
- 'bosh_vm_folder' => test_settings.ops_manager.vcenter.bosh_vm_folder,
58
- 'bosh_template_folder' => test_settings.ops_manager.vcenter.bosh_template_folder,
59
- 'bosh_disk_path' => test_settings.ops_manager.vcenter.bosh_disk_path,
54
+ 'vcenter_ip' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'ip'),
55
+ 'vcenter_username' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'username'),
56
+ 'vcenter_password' => test_settings.dig('ops_manager', 'vcenter', 'creds', 'password'),
57
+ 'datacenter' => test_settings.dig('ops_manager', 'vcenter', 'datacenter'),
58
+ 'datastores_string' => test_settings.dig('ops_manager', 'vcenter', 'persistent_datastore'),
59
+ 'bosh_vm_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_vm_folder'),
60
+ 'bosh_template_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_template_folder'),
61
+ 'bosh_disk_path' => test_settings.dig('ops_manager', 'vcenter', 'bosh_disk_path'),
60
62
  }
61
63
  end
62
64
 
63
65
  def advanced_infrastructure_config_fields
64
- { }
66
+ {}
65
67
  end
66
68
 
67
69
  private
@@ -80,19 +82,19 @@ module OpsManagerUiDrivers
80
82
 
81
83
  def iaas_configuration_fields
82
84
  {
83
- 'access_key_id' => test_settings.ops_manager.aws.aws_access_key,
84
- 'secret_access_key' => test_settings.ops_manager.aws.aws_secret_key,
85
- 'vpc_id' => test_settings.ops_manager.aws.vpc_id,
86
- 'security_group' => test_settings.ops_manager.aws.security_group,
87
- 'key_pair_name' => test_settings.ops_manager.aws.key_pair_name,
88
- 'ssh_private_key' => test_settings.ops_manager.aws.ssh_key,
89
- 'region' => test_settings.ops_manager.aws.region,
90
- 'encrypted' => test_settings.ops_manager.aws.encrypt_disk,
85
+ 'access_key_id' => test_settings.dig('ops_manager', 'aws', 'aws_access_key'),
86
+ 'secret_access_key' => test_settings.dig('ops_manager', 'aws', 'aws_secret_key'),
87
+ 'vpc_id' => test_settings.dig('ops_manager', 'aws', 'vpc_id'),
88
+ 'security_group' => test_settings.dig('ops_manager', 'aws', 'security_group'),
89
+ 'key_pair_name' => test_settings.dig('ops_manager', 'aws', 'key_pair_name'),
90
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'aws', 'ssh_key'),
91
+ 'region' => test_settings.dig('ops_manager', 'aws', 'region'),
92
+ 'encrypted' => test_settings.dig('ops_manager', 'aws', 'encrypt_disk'),
91
93
  }
92
94
  end
93
95
 
94
96
  def advanced_infrastructure_config_fields
95
- { }
97
+ {}
96
98
  end
97
99
 
98
100
  private
@@ -111,20 +113,20 @@ module OpsManagerUiDrivers
111
113
 
112
114
  def iaas_configuration_fields
113
115
  {
114
- 'identity_endpoint' => test_settings.ops_manager.openstack.identity_endpoint,
115
- 'username' => test_settings.ops_manager.openstack.username,
116
- 'password' => test_settings.ops_manager.openstack.password,
117
- 'tenant' => test_settings.ops_manager.openstack.tenant,
118
- 'security_group' => test_settings.ops_manager.openstack.security_group_name,
119
- 'key_pair_name' => test_settings.ops_manager.openstack.key_pair_name,
120
- 'ssh_private_key' => test_settings.ops_manager.openstack.ssh_private_key,
121
- 'region' => test_settings.ops_manager.openstack.region,
122
- 'disable_dhcp' => test_settings.ops_manager.openstack.disable_dhcp,
116
+ 'identity_endpoint' => test_settings.dig('ops_manager', 'openstack', 'identity_endpoint'),
117
+ 'username' => test_settings.dig('ops_manager', 'openstack', 'username'),
118
+ 'password' => test_settings.dig('ops_manager', 'openstack', 'password'),
119
+ 'tenant' => test_settings.dig('ops_manager', 'openstack', 'tenant'),
120
+ 'security_group' => test_settings.dig('ops_manager', 'openstack', 'security_group_name'),
121
+ 'key_pair_name' => test_settings.dig('ops_manager', 'openstack', 'key_pair_name'),
122
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'openstack', 'ssh_private_key'),
123
+ 'region' => test_settings.dig('ops_manager', 'openstack', 'region'),
124
+ 'disable_dhcp' => test_settings.dig('ops_manager', 'openstack', 'disable_dhcp'),
123
125
  }
124
126
  end
125
127
 
126
128
  def advanced_infrastructure_config_fields
127
- { 'connection_options' => test_settings.ops_manager.openstack.connection_options }
129
+ {'connection_options' => test_settings.dig('ops_manager', 'openstack', 'connection_options')}
128
130
  end
129
131
 
130
132
  private
@@ -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,11 +55,11 @@ module OpsManagerUiDrivers
55
55
  def assign_availability_zones_for_product(product:, zones:)
56
56
  if zones
57
57
  Version16::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
@@ -70,7 +70,7 @@ module OpsManagerUiDrivers
70
70
  end
71
71
 
72
72
  def current_time
73
- uri = URI(Capybara.app_host)
73
+ uri = URI(Capybara.app_host)
74
74
  uri.path = '/'
75
75
  Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https'), verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
76
76
  response = http.request(Net::HTTP::Get.new(uri))