ops_manager_ui_drivers 2.36.0 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ops_manager_ui_drivers/page_helpers.rb +14 -2
  3. data/lib/ops_manager_ui_drivers/version.rb +1 -1
  4. data/lib/ops_manager_ui_drivers/version110/api.rb +8 -0
  5. data/lib/ops_manager_ui_drivers/version110/available_products.rb +8 -0
  6. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
  7. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/availability_zones.rb +10 -0
  8. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/bosh_product_form_section.rb +10 -0
  9. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/iaas_configuration.rb +10 -0
  10. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/networks.rb +10 -0
  11. data/lib/ops_manager_ui_drivers/version110/bosh_product_sections/subnet.rb +10 -0
  12. data/lib/ops_manager_ui_drivers/version110/job_az_and_network_mapping_helper.rb +8 -0
  13. data/lib/ops_manager_ui_drivers/version110/job_network_mapping_helper.rb +8 -0
  14. data/lib/ops_manager_ui_drivers/version110/job_status_helper.rb +8 -0
  15. data/lib/ops_manager_ui_drivers/version110/ops_manager_director.rb +8 -0
  16. data/lib/ops_manager_ui_drivers/version110/product_availability_zones.rb +10 -0
  17. data/lib/ops_manager_ui_drivers/version110/product_configuration.rb +8 -0
  18. data/lib/ops_manager_ui_drivers/version110/product_dashboard.rb +8 -0
  19. data/lib/ops_manager_ui_drivers/version110/product_errands.rb +8 -0
  20. data/lib/ops_manager_ui_drivers/version110/product_form.rb +8 -0
  21. data/lib/ops_manager_ui_drivers/version110/product_logs.rb +8 -0
  22. data/lib/ops_manager_ui_drivers/version110/product_resource_configuration.rb +8 -0
  23. data/lib/ops_manager_ui_drivers/version110/product_status_helper.rb +8 -0
  24. data/lib/ops_manager_ui_drivers/version110/settings.rb +103 -0
  25. data/lib/ops_manager_ui_drivers/version110/setup.rb +8 -0
  26. data/lib/ops_manager_ui_drivers/version110/state_change_progress.rb +8 -0
  27. data/lib/ops_manager_ui_drivers/version110/user_settings.rb +11 -0
  28. data/lib/ops_manager_ui_drivers/version110/web_ui.rb +112 -0
  29. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 028620540582a5f0ab386be196409ab6df0eb489
4
- data.tar.gz: 37d704031874e99770e4514ac53c640220531d48
3
+ metadata.gz: a6fbd97e0a382012a0049bcc683d46853cbe2174
4
+ data.tar.gz: c49c377434410918ff6f09c821e30adefe342820
5
5
  SHA512:
6
- metadata.gz: 93975faa4660f45cfb8f4387fc51d149c464e45a99cf7df9e2e3066dbf10ffdc97f86dcc62938eff9e56d517d97f3cd0fc391f9451bf2304902de7dda8ae8a27
7
- data.tar.gz: c1ba94653925c7cac837b885f112d6cc1415be0bfd7ad925ea83f2467f1276e4a35b218a1c817a717536e59616bf3a573f921b5c530386a4762211e66551c91e
6
+ metadata.gz: d920009207c43ff123d9441bab48492a074a2ac65220dd86b79e685f4df998ca1f1371d64510195c33f59cde82b88f76677e3f3e539cfbbca352fc5901812e78
7
+ data.tar.gz: aee3fb98313a8030c409eb42ac4de9041e18c4baad2c38f1f8b9191f71d5dcc1a7b0c6f00fa468e6fc0ff5603f666bfdc40d9dfb6d7f3c4826c6ae41e0f449bc
@@ -52,6 +52,14 @@ module OpsManagerUiDrivers
52
52
  )
53
53
  end
54
54
 
55
+ def om_1_10(ops_manager_url, browser = self)
56
+ @om_1_10 ||= create_web_ui(
57
+ ops_manager_url: ops_manager_url,
58
+ browser: browser,
59
+ version_module: Version110,
60
+ )
61
+ end
62
+
55
63
  def api_1_4(host:, username:, password:)
56
64
  Version14::Api.new(host_uri: host, username: username, password: password)
57
65
  end
@@ -76,8 +84,12 @@ module OpsManagerUiDrivers
76
84
  Version19::Api.new(host_uri: host, username: username, password: password)
77
85
  end
78
86
 
79
- alias_method :om_rc, :om_1_9
80
- alias_method :api_rc, :api_1_9
87
+ def api_1_10(host:, username:, password:)
88
+ Version110::Api.new(host_uri: host, username: username, password: password)
89
+ end
90
+
91
+ alias_method :om_rc, :om_1_10
92
+ alias_method :api_rc, :api_1_10
81
93
 
82
94
  private
83
95
 
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.36.0'
2
+ VERSION = '2.37.0'
3
3
  end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/api'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class Api < Version19::Api
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/available_products'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class AvailableProducts < Version19::AvailableProducts
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class AdvancedInfrastructureConfig < Version19::BoshProductSections::AdvancedInfrastructureConfig
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class AvailabilityZones < Version19::BoshProductSections::AvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/bosh_product_form_section'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class BoshProductFormSection < Version19::BoshProductSections::BoshProductFormSection
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/iaas_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class IaasConfiguration < Version19::BoshProductSections::IaasConfiguration
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/networks'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class Networks < Version19::BoshProductSections::Networks
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/bosh_product_sections/subnet'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ module BoshProductSections
6
+ class Subnet < Version19::BoshProductSections::Subnet
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/job_az_and_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class JobAzAndNetworkMappingHelper < Version19::JobAzAndNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/job_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class JobNetworkMappingHelper < Version19::JobNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/job_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class JobStatusHelper < Version19::JobStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/ops_manager_director'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class OpsManagerDirector < Version19::OpsManagerDirector
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version19/product_availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class WebUi
6
+ class ProductAvailabilityZones < Version19::WebUi::ProductAvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductConfiguration < Version19::ProductConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_dashboard'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductDashboard < Version19::ProductDashboard
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_errands'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductErrands < Version19::ProductErrands
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_form'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductForm < Version19::ProductForm
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_logs'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductLogs < Version19::ProductLogs
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_resource_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductResourceConfiguration < Version19::ProductResourceConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/product_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class ProductStatusHelper < Version19::ProductStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,103 @@
1
+ require 'ops_manager_ui_drivers/version19/settings'
2
+ using OpsManagerUiDrivers::BackportRefinements
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version110
6
+ module Settings
7
+ def self.for(test_settings)
8
+ iaas_type = test_settings.dig('iaas_type')
9
+ settings_class =
10
+ [Vcloud, Vsphere, AWS, OpenStack, Google, Azure].find do |klass|
11
+ klass.works_with?(iaas_type)
12
+ end or fail("Unsupported IaaS: #{iaas_type.inspect}")
13
+ settings_class.new(test_settings)
14
+ end
15
+
16
+ def self.build_browser_command(command, arg)
17
+ {
18
+ 'browser_command' => command,
19
+ 'browser_arg' => arg,
20
+ }
21
+ end
22
+
23
+ class Vcloud < Version19::Settings::Vcloud
24
+ end
25
+
26
+ class Vsphere < Version19::Settings::Vsphere
27
+ end
28
+
29
+ class AWS < Version19::Settings::AWS
30
+ end
31
+
32
+ class OpenStack < Version19::Settings::OpenStack
33
+ end
34
+
35
+ class Google
36
+ def self.works_with?(iaas_type)
37
+ iaas_type == 'google'
38
+ end
39
+
40
+ def initialize(test_settings)
41
+ @test_settings = test_settings
42
+ end
43
+
44
+ def iaas_configuration_fields
45
+ {
46
+ 'project' => @test_settings.dig('ops_manager', 'google', 'project'),
47
+ 'default_deployment_tag' => @test_settings.dig('ops_manager', 'google', 'deployment_tag'),
48
+ }.merge(iaas_security_configuration_fields)
49
+ end
50
+
51
+ def advanced_infrastructure_config_fields
52
+ {
53
+ }
54
+ end
55
+
56
+ private
57
+
58
+ def iaas_security_configuration_fields
59
+ if @test_settings.dig('ops_manager', 'google', 'auth_json')
60
+ {
61
+ 'access_type' => Settings.build_browser_command('choose', 'AuthJSON'),
62
+ 'auth_json' => @test_settings.dig('ops_manager', 'google', 'auth_json'),
63
+ }
64
+ else
65
+ {
66
+ 'access_type' => Settings.build_browser_command('choose', 'The Ops Manager VM Service Account'),
67
+ }
68
+ end
69
+ end
70
+ end
71
+
72
+ class Azure
73
+ def self.works_with?(iaas_type)
74
+ iaas_type == 'azure'
75
+ end
76
+
77
+ def initialize(test_settings)
78
+ @test_settings = test_settings
79
+ end
80
+
81
+ def iaas_configuration_fields
82
+ {
83
+ 'subscription_id' => @test_settings.dig('ops_manager', 'azure', 'subscription_id'),
84
+ 'tenant_id' => @test_settings.dig('ops_manager', 'azure', 'tenant_id'),
85
+ 'client_id' => @test_settings.dig('ops_manager', 'azure', 'client_id'),
86
+ 'client_secret' => @test_settings.dig('ops_manager', 'azure', 'client_secret'),
87
+ 'resource_group_name' => @test_settings.dig('ops_manager', 'azure', 'resource_group_name'),
88
+ 'bosh_storage_account_name' => @test_settings.dig('ops_manager', 'azure', 'bosh_storage_account_name'),
89
+ 'deployments_storage_account_name' => @test_settings.dig('ops_manager', 'azure', 'deployments_storage_account_name'),
90
+ 'default_security_group' => @test_settings.dig('ops_manager', 'azure', 'default_security_group'),
91
+ 'ssh_public_key' => @test_settings.dig('ops_manager', 'azure', 'ssh_public_key'),
92
+ 'ssh_private_key' => @test_settings.dig('ops_manager', 'azure', 'ssh_private_key'),
93
+ }
94
+ end
95
+
96
+ def advanced_infrastructure_config_fields
97
+ {
98
+ }
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/setup'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class Setup < Version19::Setup
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version19/state_change_progress'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class StateChangeProgress < OpsManagerUiDrivers::Version19::StateChangeProgress
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ require 'ops_manager_ui_drivers/version19/user_settings'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version110
5
+ class UserSettings < Version19::UserSettings
6
+ end
7
+ end
8
+ end
9
+
10
+
11
+
@@ -0,0 +1,112 @@
1
+ require 'net/https'
2
+ require 'date'
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version110
6
+ class WebUi
7
+ def initialize(browser:)
8
+ @browser = browser
9
+ end
10
+
11
+ def setup_page
12
+ Version110::Setup.new(browser: browser)
13
+ end
14
+
15
+ def settings_page
16
+ Version110::UserSettings.new(browser: browser)
17
+ end
18
+
19
+ def product_dashboard
20
+ Version110::ProductDashboard.new(browser: browser)
21
+ end
22
+
23
+ def state_change_progress
24
+ Version110::StateChangeProgress.new(browser: browser)
25
+ end
26
+
27
+ def available_products
28
+ Version110::AvailableProducts.new(browser: browser)
29
+ end
30
+
31
+ def ops_manager_director
32
+ Version110::OpsManagerDirector.new(browser: browser)
33
+ end
34
+
35
+ def product_logs_for(product_name)
36
+ Version110::ProductLogs.new(browser: browser, product_name: product_name)
37
+ end
38
+
39
+ def product_resources_configuration(product_name)
40
+ Version110::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
41
+ end
42
+
43
+ def product(product_name)
44
+ Version110::ProductConfiguration.new(browser: browser, product_name: product_name)
45
+ end
46
+
47
+ def product_status_for(product_name)
48
+ Version110::ProductStatusHelper.new(browser: browser, product_name: product_name)
49
+ end
50
+
51
+ def product_availability_zones(product_name)
52
+ Version110::ProductAvailabilityZones.new(browser: browser, product: product_name)
53
+ end
54
+
55
+ def job_azs_and_network_mapping_for(product_name)
56
+ Version110::JobAzAndNetworkMappingHelper.new(
57
+ browser: browser,
58
+ product_name: product_name,
59
+ )
60
+ end
61
+
62
+ def assign_azs_and_network_for_product(product_name:, zones:, network:)
63
+ zones_present = zones && zones.first
64
+
65
+ singleton_az = zones_present ? (zones[0]['iaas_identifier'] || zones[0]['name']) : nil
66
+ availability_zones = zones_present ? zones.map{|zone| (zone['iaas_identifier'] || zone['name']) } : nil
67
+
68
+ job_azs_and_network_mapping_for(product_name).assign_azs_and_network(
69
+ singleton_availability_zone: singleton_az,
70
+ availability_zones: availability_zones,
71
+ network: network,
72
+ )
73
+ end
74
+
75
+ def current_time
76
+ uri = URI(Capybara.app_host)
77
+ uri.path = '/'
78
+ Net::HTTP.start(uri.hostname, uri.port, use_ssl: (uri.scheme == 'https'), verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
79
+ response = http.request(Net::HTTP::Get.new(uri))
80
+ DateTime.parse(response['Date'])
81
+ end
82
+ end
83
+
84
+ def flash_message
85
+ browser.find('.flash-message').text
86
+ end
87
+
88
+ def availability_zone_guid_for_name(az_name)
89
+ browser.visit '/'
90
+ browser.click_on 'show-p-bosh-configure-action'
91
+ browser.click_on 'show-director-az-and-network-assignment-action'
92
+
93
+ availability_zone_options = find_az_field
94
+ availability_zone_options.each do |element|
95
+ if element.text == az_name
96
+ return element[:value]
97
+ end
98
+ end
99
+ end
100
+
101
+ private
102
+
103
+ attr_reader :browser
104
+
105
+ def find_az_field
106
+ browser.find_field('Singleton Availability Zone').all('option')
107
+ rescue Capybara::ElementNotFound
108
+ browser.find_field('Singleton Availability Zone', disabled: true).all('option')
109
+ end
110
+ end
111
+ end
112
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.36.0
4
+ version: 2.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-29 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -189,6 +189,31 @@ files:
189
189
  - lib/ops_manager_ui_drivers/logger.rb
190
190
  - lib/ops_manager_ui_drivers/page_helpers.rb
191
191
  - lib/ops_manager_ui_drivers/version.rb
192
+ - lib/ops_manager_ui_drivers/version110/api.rb
193
+ - lib/ops_manager_ui_drivers/version110/available_products.rb
194
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/advanced_infrastructure_config.rb
195
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/availability_zones.rb
196
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/bosh_product_form_section.rb
197
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/iaas_configuration.rb
198
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/networks.rb
199
+ - lib/ops_manager_ui_drivers/version110/bosh_product_sections/subnet.rb
200
+ - lib/ops_manager_ui_drivers/version110/job_az_and_network_mapping_helper.rb
201
+ - lib/ops_manager_ui_drivers/version110/job_network_mapping_helper.rb
202
+ - lib/ops_manager_ui_drivers/version110/job_status_helper.rb
203
+ - lib/ops_manager_ui_drivers/version110/ops_manager_director.rb
204
+ - lib/ops_manager_ui_drivers/version110/product_availability_zones.rb
205
+ - lib/ops_manager_ui_drivers/version110/product_configuration.rb
206
+ - lib/ops_manager_ui_drivers/version110/product_dashboard.rb
207
+ - lib/ops_manager_ui_drivers/version110/product_errands.rb
208
+ - lib/ops_manager_ui_drivers/version110/product_form.rb
209
+ - lib/ops_manager_ui_drivers/version110/product_logs.rb
210
+ - lib/ops_manager_ui_drivers/version110/product_resource_configuration.rb
211
+ - lib/ops_manager_ui_drivers/version110/product_status_helper.rb
212
+ - lib/ops_manager_ui_drivers/version110/settings.rb
213
+ - lib/ops_manager_ui_drivers/version110/setup.rb
214
+ - lib/ops_manager_ui_drivers/version110/state_change_progress.rb
215
+ - lib/ops_manager_ui_drivers/version110/user_settings.rb
216
+ - lib/ops_manager_ui_drivers/version110/web_ui.rb
192
217
  - lib/ops_manager_ui_drivers/version14/api.rb
193
218
  - lib/ops_manager_ui_drivers/version14/availability_zones.rb
194
219
  - lib/ops_manager_ui_drivers/version14/available_products.rb