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
@@ -17,7 +17,7 @@ module OpsManagerUiDrivers
17
17
  private
18
18
 
19
19
  def uaa_token
20
- target_url = @host_uri.to_s + '/uaa'
20
+ target_url = @host_uri.to_s + '/uaa'
21
21
  token_issuer = CF::UAA::TokenIssuer.new(target_url, 'opsman', nil, {:skip_ssl_validation => true})
22
22
  token_issuer.owner_password_grant('admin', 'admin')
23
23
  end
@@ -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
 
@@ -5,7 +5,7 @@ module OpsManagerUiDrivers
5
5
  attr_reader :field_prefix
6
6
 
7
7
  def initialize(browser, field_prefix)
8
- @browser = browser
8
+ @browser = browser
9
9
  @field_prefix = field_prefix
10
10
  end
11
11
 
@@ -22,7 +22,7 @@ module OpsManagerUiDrivers
22
22
 
23
23
  def set_fields(fields)
24
24
  fields.each do |field, value|
25
- set_field(field, value)
25
+ set_field(field, value)
26
26
  end
27
27
  end
28
28
 
@@ -2,11 +2,11 @@ module OpsManagerUiDrivers
2
2
  module Version17
3
3
  module BoshProductSections
4
4
  class Networks
5
- FLASH_MESSAGE_CLASS = '.flash-message'.freeze
5
+ FLASH_MESSAGE_CLASS = '.flash-message'.freeze
6
6
  FLASH_MESSAGE_ERRORS = '.flash-message.error ul.message li'.freeze
7
7
 
8
8
  def initialize(browser:)
9
- @browser = browser
9
+ @browser = browser
10
10
  @bosh_product_form_section = BoshProductFormSection.new(@browser, 'network_collection[networks_attributes][0]')
11
11
  end
12
12
 
@@ -2,20 +2,20 @@ module OpsManagerUiDrivers
2
2
  module Version17
3
3
  module BoshProductSections
4
4
  class Subnet
5
- FLASH_MESSAGE_CLASS = '.flash-message'.freeze
5
+ FLASH_MESSAGE_CLASS = '.flash-message'.freeze
6
6
  FLASH_MESSAGE_ERRORS = '.flash-message.error ul.message li'.freeze
7
7
 
8
8
  def initialize(browser:, network_form:)
9
- @browser = browser
9
+ @browser = browser
10
10
  @bosh_product_form_section = BoshProductFormSection.new(@browser, "#{network_form.field_prefix}[subnets][0]")
11
11
  end
12
12
 
13
13
  def add_subnet(iaas_identifier:, subnet:, dns:, gateway:, reserved_ip_ranges:)
14
14
  @bosh_product_form_section.set_fields(
15
- 'iaas_identifier' => iaas_identifier,
16
- 'cidr' => subnet,
17
- 'dns' => dns,
18
- 'gateway' => gateway,
15
+ 'iaas_identifier' => iaas_identifier,
16
+ 'cidr' => subnet,
17
+ 'dns' => dns,
18
+ 'gateway' => gateway,
19
19
  'reserved_ip_ranges' => reserved_ip_ranges,
20
20
  )
21
21
  @bosh_product_form_section.select_all_az_references_on_page
@@ -3,12 +3,12 @@ module OpsManagerUiDrivers
3
3
  class JobAzAndNetworkMappingHelper
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][]']"
11
- NETWORK_FIELD_NAME = "product_network_reference"
10
+ AVAILABILITY_ZONE_INPUT_SELECTOR = "input[name='product[availability_zone_references][]']"
11
+ NETWORK_FIELD_NAME = "product_network_reference"
12
12
 
13
13
  def assign_azs_and_network(singleton_availability_zone: nil, availability_zones: [], network:)
14
14
  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
 
@@ -2,27 +2,27 @@ module OpsManagerUiDrivers
2
2
  module Version17
3
3
  class OpsManagerDirector
4
4
  def initialize(browser:, iaas_configuration: Version17::BoshProductSections::IaasConfiguration.new(browser: browser))
5
- @browser = browser
5
+ @browser = browser
6
6
  @iaas_configuration = iaas_configuration
7
7
  end
8
8
 
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
16
  add_networks(test_settings)
17
17
 
18
- assign_azs_and_networks(test_settings.iaas_type, test_settings.ops_manager.availability_zones, test_settings.ops_manager)
18
+ assign_azs_and_networks(test_settings.dig('iaas_type'), test_settings.dig('ops_manager', 'availability_zones'), test_settings.dig('ops_manager'))
19
19
 
20
- configure_experimental_features(test_settings.ops_manager.experimental_features)
20
+ configure_experimental_features(test_settings.dig('ops_manager', 'experimental_features'))
21
21
  end
22
22
 
23
23
  def configure_iaas(test_settings)
24
- iaas_settings = Settings.for(test_settings)
25
- iaas_specific_fields = iaas_settings.iaas_configuration_fields
24
+ iaas_settings = Settings.for(test_settings)
25
+ iaas_specific_fields = iaas_settings.iaas_configuration_fields
26
26
  advanced_infrastructure_config_fields = iaas_settings.advanced_infrastructure_config_fields
27
27
  iaas_configuration.fill_iaas_settings(iaas_specific_fields)
28
28
  advanced_infrastructure_config.fill_advanced_infrastructure_config_settings(advanced_infrastructure_config_fields)
@@ -41,16 +41,16 @@ 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
46
  iaas_networks && iaas_networks.each do |network|
47
47
  networks.add_network(
48
- name: network['name'],
48
+ name: network['name'],
49
49
  iaas_network_identifier: network['identifier'],
50
- subnet: network['subnet'],
51
- reserved_ip_ranges: network['reserved_ips'],
52
- dns: network['dns'],
53
- gateway: network['gateway'],
50
+ subnet: network['subnet'],
51
+ reserved_ip_ranges: network['reserved_ips'],
52
+ dns: network['dns'],
53
+ gateway: network['gateway'],
54
54
  )
55
55
  end
56
56
  end
@@ -61,10 +61,10 @@ module OpsManagerUiDrivers
61
61
 
62
62
  def config_director(ops_manager)
63
63
  browser.click_on 'Director Config'
64
- browser.fill_in('director_configuration[ntp_servers_string]', with: ops_manager.ntp_servers)
65
- browser.check('Enable VM Resurrector Plugin') if ops_manager.resurrector_enabled
64
+ browser.fill_in('director_configuration[ntp_servers_string]', with: ops_manager.dig('ntp_servers'))
65
+ browser.check('Enable VM Resurrector Plugin') if ops_manager.dig('resurrector_enabled')
66
66
 
67
- s3_blobstore = ops_manager.s3_blobstore
67
+ s3_blobstore = ops_manager.dig('s3_blobstore')
68
68
  if s3_blobstore
69
69
  browser.choose('S3 Compatible Blobstore')
70
70
  browser.fill_in('director_configuration[s3_blobstore_options][endpoint]', with: s3_blobstore.endpoint)
@@ -73,7 +73,7 @@ module OpsManagerUiDrivers
73
73
  browser.fill_in('director_configuration[s3_blobstore_options][secret_key]', with: s3_blobstore.secret_access_key)
74
74
  end
75
75
 
76
- mysql = ops_manager.mysql
76
+ mysql = ops_manager.dig('mysql')
77
77
  if mysql
78
78
  browser.choose('External MySQL Database')
79
79
  browser.fill_in('director_configuration[external_database_options][host]', with: mysql.host)
@@ -90,15 +90,15 @@ module OpsManagerUiDrivers
90
90
  case iaas_type
91
91
  when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE
92
92
  browser.click_on 'Assign AZs and Networks'
93
- browser.select(ops_manager.networks[0]['name'], from: 'Network')
93
+ browser.select(ops_manager.dig('networks', 0, 'name'), from: 'Network')
94
94
  browser.select(iaas_availability_zones.first['iaas_identifier'])
95
95
  when OpsManagerUiDrivers::VSPHERE_IAAS_TYPE
96
96
  browser.click_on 'Assign AZs and Networks'
97
- browser.select(ops_manager.networks[0]['name'], from: 'Network')
97
+ browser.select(ops_manager.dig('networks', 0, 'name'), from: 'Network')
98
98
  browser.select(iaas_availability_zones.first['name'])
99
99
  when OpsManagerUiDrivers::VCLOUD_IAAS_TYPE
100
100
  browser.click_on 'Assign Networks'
101
- browser.select(ops_manager.networks[0]['name'], from: 'Network')
101
+ browser.select(ops_manager.dig('networks', 0, 'name'), from: 'Network')
102
102
  end
103
103
  browser.click_on 'Save'
104
104
  end
@@ -118,7 +118,7 @@ module OpsManagerUiDrivers
118
118
  def configure_experimental_features(experimental_features)
119
119
  browser.click_on 'Experimental Features'
120
120
 
121
- trusted_certificates = experimental_features ? experimental_features.trusted_certificates : ''
121
+ trusted_certificates = experimental_features ? experimental_features.dig('trusted_certificates') : ''
122
122
 
123
123
  browser.fill_in('experimental_features[trusted_certificates]', with: trusted_certificates)
124
124
  end
@@ -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
 
@@ -3,6 +3,10 @@ require 'ops_manager_ui_drivers/version16/product_dashboard'
3
3
  module OpsManagerUiDrivers
4
4
  module Version17
5
5
  class ProductDashboard < Version16::ProductDashboard
6
+ def import_installation_file(_file_path)
7
+ fail('Importing is no longer supported via the Product Dashboard. See Version17::Setup#import_installation_file')
8
+ end
9
+
6
10
  def product_available?(product_name, product_version)
7
11
  open_dashboard
8
12
  browser.all("li.#{product_name} input#product_version[value='#{product_version}']", {visible: false}).any?
@@ -2,7 +2,7 @@ module OpsManagerUiDrivers
2
2
  module Version17
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 Version17
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 Version17
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 Version17
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,20 +51,20 @@ 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
- 'ephemeral_datastores_string' => test_settings.ops_manager.vcenter.ephemeral_datastore,
57
- 'persistent_datastores_string' => test_settings.ops_manager.vcenter.persistent_datastore,
58
- 'bosh_vm_folder' => test_settings.ops_manager.vcenter.bosh_vm_folder,
59
- 'bosh_template_folder' => test_settings.ops_manager.vcenter.bosh_template_folder,
60
- '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
+ 'ephemeral_datastores_string' => test_settings.dig('ops_manager', 'vcenter', 'ephemeral_datastore'),
59
+ 'persistent_datastores_string' => test_settings.dig('ops_manager', 'vcenter', 'persistent_datastore'),
60
+ 'bosh_vm_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_vm_folder'),
61
+ 'bosh_template_folder' => test_settings.dig('ops_manager', 'vcenter', 'bosh_template_folder'),
62
+ 'bosh_disk_path' => test_settings.dig('ops_manager', 'vcenter', 'bosh_disk_path'),
61
63
  }
62
64
  end
63
65
 
64
66
  def advanced_infrastructure_config_fields
65
- { }
67
+ {}
66
68
  end
67
69
 
68
70
  private
@@ -81,19 +83,19 @@ module OpsManagerUiDrivers
81
83
 
82
84
  def iaas_configuration_fields
83
85
  {
84
- 'access_key_id' => test_settings.ops_manager.aws.aws_access_key,
85
- 'secret_access_key' => test_settings.ops_manager.aws.aws_secret_key,
86
- 'vpc_id' => test_settings.ops_manager.aws.vpc_id,
87
- 'security_group' => test_settings.ops_manager.aws.security_group,
88
- 'key_pair_name' => test_settings.ops_manager.aws.key_pair_name,
89
- 'ssh_private_key' => test_settings.ops_manager.aws.ssh_key,
90
- 'region' => test_settings.ops_manager.aws.region,
91
- 'encrypted' => test_settings.ops_manager.aws.encrypt_disk,
86
+ 'access_key_id' => test_settings.dig('ops_manager', 'aws', 'aws_access_key'),
87
+ 'secret_access_key' => test_settings.dig('ops_manager', 'aws', 'aws_secret_key'),
88
+ 'vpc_id' => test_settings.dig('ops_manager', 'aws', 'vpc_id'),
89
+ 'security_group' => test_settings.dig('ops_manager', 'aws', 'security_group'),
90
+ 'key_pair_name' => test_settings.dig('ops_manager', 'aws', 'key_pair_name'),
91
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'aws', 'ssh_key'),
92
+ 'region' => test_settings.dig('ops_manager', 'aws', 'region'),
93
+ 'encrypted' => test_settings.dig('ops_manager', 'aws', 'encrypt_disk'),
92
94
  }
93
95
  end
94
96
 
95
97
  def advanced_infrastructure_config_fields
96
- { }
98
+ {}
97
99
  end
98
100
 
99
101
  private
@@ -112,20 +114,20 @@ module OpsManagerUiDrivers
112
114
 
113
115
  def iaas_configuration_fields
114
116
  {
115
- 'identity_endpoint' => test_settings.ops_manager.openstack.identity_endpoint,
116
- 'username' => test_settings.ops_manager.openstack.username,
117
- 'password' => test_settings.ops_manager.openstack.password,
118
- 'tenant' => test_settings.ops_manager.openstack.tenant,
119
- 'security_group' => test_settings.ops_manager.openstack.security_group_name,
120
- 'key_pair_name' => test_settings.ops_manager.openstack.key_pair_name,
121
- 'ssh_private_key' => test_settings.ops_manager.openstack.ssh_private_key,
122
- 'region' => test_settings.ops_manager.openstack.region,
123
- 'disable_dhcp' => test_settings.ops_manager.openstack.disable_dhcp,
117
+ 'identity_endpoint' => test_settings.dig('ops_manager', 'openstack', 'identity_endpoint'),
118
+ 'username' => test_settings.dig('ops_manager', 'openstack', 'username'),
119
+ 'password' => test_settings.dig('ops_manager', 'openstack', 'password'),
120
+ 'tenant' => test_settings.dig('ops_manager', 'openstack', 'tenant'),
121
+ 'security_group' => test_settings.dig('ops_manager', 'openstack', 'security_group_name'),
122
+ 'key_pair_name' => test_settings.dig('ops_manager', 'openstack', 'key_pair_name'),
123
+ 'ssh_private_key' => test_settings.dig('ops_manager', 'openstack', 'ssh_private_key'),
124
+ 'region' => test_settings.dig('ops_manager', 'openstack', 'region'),
125
+ 'disable_dhcp' => test_settings.dig('ops_manager', 'openstack', 'disable_dhcp'),
124
126
  }
125
127
  end
126
128
 
127
129
  def advanced_infrastructure_config_fields
128
- { 'connection_options' => test_settings.ops_manager.openstack.connection_options }
130
+ {'connection_options' => test_settings.dig('ops_manager', 'openstack', 'connection_options')}
129
131
  end
130
132
 
131
133
  private
@@ -3,6 +3,16 @@ require 'ops_manager_ui_drivers/version16/setup'
3
3
  module OpsManagerUiDrivers
4
4
  module Version17
5
5
  class Setup < Version16::Setup
6
+ def import_installation_file(file_path, decryption_passphrase)
7
+ browser.visit '/import/new'
8
+
9
+ browser.fill_in 'import[passphrase]', with: decryption_passphrase
10
+ browser.attach_file 'import[file]', file_path
11
+ browser.click_on 'Import'
12
+
13
+ browser.poll_up_to_times(20) { browser.assert_text('Successfully imported installation.') }
14
+ end
15
+
6
16
  def setup_and_login(user:, password:, decryption_passphrase: password)
7
17
  browser.visit '/setup'
8
18
  browser.fill_in 'setup[admin_user_name]', with: user, wait: 4
@@ -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
 
@@ -50,7 +50,7 @@ module OpsManagerUiDrivers
50
50
 
51
51
  def job_azs_and_network_mapping_for(product_name)
52
52
  Version17::JobAzAndNetworkMappingHelper.new(
53
- browser: browser,
53
+ browser: browser,
54
54
  product_name: product_name,
55
55
  )
56
56
  end
@@ -59,13 +59,13 @@ module OpsManagerUiDrivers
59
59
  zones_present = zones && zones.first
60
60
  job_azs_and_network_mapping_for(product_name).assign_azs_and_network(
61
61
  singleton_availability_zone: zones_present ? zones[0]['name'] : nil,
62
- availability_zones: zones_present ? zones.map { |z| z['name'] } : [],
63
- network: network
62
+ availability_zones: zones_present ? zones.map { |z| z['name'] } : [],
63
+ network: network
64
64
  )
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))
@@ -5,8 +5,8 @@ Dir[File.join(__dir__, '**', '*.rb')].each do |ops_manager_ui_drivers|
5
5
  end
6
6
 
7
7
  module OpsManagerUiDrivers
8
- AWS_IAAS_TYPE = 'aws'.freeze
8
+ AWS_IAAS_TYPE = 'aws'.freeze
9
9
  OPENSTACK_IAAS_TYPE = 'openstack'.freeze
10
- VCLOUD_IAAS_TYPE = 'vcloud'.freeze
11
- VSPHERE_IAAS_TYPE = 'vsphere'.freeze
10
+ VCLOUD_IAAS_TYPE = 'vcloud'.freeze
11
+ VSPHERE_IAAS_TYPE = 'vsphere'.freeze
12
12
  end
@@ -4,14 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'ops_manager_ui_drivers/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = 'ops_manager_ui_drivers'
8
- spec.version = OpsManagerUiDrivers::VERSION
9
- spec.authors = ['Pivotal, Inc.']
10
- spec.email = ['cf-tempest-eng+ops_manager_ui_drivers@pivotal.io']
7
+ spec.name = 'ops_manager_ui_drivers'
8
+ spec.version = OpsManagerUiDrivers::VERSION
9
+ spec.authors = ['Pivotal, Inc.']
10
+ spec.email = ['cf-tempest-eng+ops_manager_ui_drivers@pivotal.io']
11
11
 
12
- spec.summary = %q{Capybara helpers for configuring Pivotal Ops Manager}
13
- spec.homepage = 'https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers'
14
- spec.license = 'Apache 2.0'
12
+ spec.summary = %q{Capybara helpers for configuring Pivotal Ops Manager}
13
+ spec.homepage = 'https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers'
14
+ spec.license = 'Apache 2.0'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.bindir = 'exe'
@@ -30,5 +30,4 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rake'
31
31
  spec.add_development_dependency 'rubocop'
32
32
  spec.add_development_dependency 'rspec'
33
- spec.add_development_dependency 'recursive-open-struct'
34
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.
@@ -164,20 +164,6 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: recursive-open-struct
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
167
  description:
182
168
  email:
183
169
  - cf-tempest-eng+ops_manager_ui_drivers@pivotal.io
@@ -187,6 +173,7 @@ extra_rdoc_files: []
187
173
  files:
188
174
  - ".gitignore"
189
175
  - ".rspec"
176
+ - ".ruby-version"
190
177
  - ".travis.yml"
191
178
  - Gemfile
192
179
  - LICENSE