ops_manager_ui_drivers 2.34.1 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ops_manager_ui_drivers/page_helpers.rb +8 -0
  3. data/lib/ops_manager_ui_drivers/version.rb +1 -1
  4. data/lib/ops_manager_ui_drivers/version19/api.rb +8 -0
  5. data/lib/ops_manager_ui_drivers/version19/available_products.rb +8 -0
  6. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
  7. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/availability_zones.rb +10 -0
  8. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/bosh_product_form_section.rb +10 -0
  9. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/iaas_configuration.rb +10 -0
  10. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/networks.rb +10 -0
  11. data/lib/ops_manager_ui_drivers/version19/bosh_product_sections/subnet.rb +10 -0
  12. data/lib/ops_manager_ui_drivers/version19/job_az_and_network_mapping_helper.rb +8 -0
  13. data/lib/ops_manager_ui_drivers/version19/job_network_mapping_helper.rb +8 -0
  14. data/lib/ops_manager_ui_drivers/version19/job_status_helper.rb +6 -0
  15. data/lib/ops_manager_ui_drivers/version19/ops_manager_director.rb +8 -0
  16. data/lib/ops_manager_ui_drivers/version19/product_availability_zones.rb +10 -0
  17. data/lib/ops_manager_ui_drivers/version19/product_configuration.rb +8 -0
  18. data/lib/ops_manager_ui_drivers/version19/product_dashboard.rb +8 -0
  19. data/lib/ops_manager_ui_drivers/version19/product_errands.rb +8 -0
  20. data/lib/ops_manager_ui_drivers/version19/product_form.rb +8 -0
  21. data/lib/ops_manager_ui_drivers/version19/product_logs.rb +8 -0
  22. data/lib/ops_manager_ui_drivers/version19/product_resource_configuration.rb +8 -0
  23. data/lib/ops_manager_ui_drivers/version19/product_status_helper.rb +8 -0
  24. data/lib/ops_manager_ui_drivers/version19/settings.rb +103 -0
  25. data/lib/ops_manager_ui_drivers/version19/setup.rb +8 -0
  26. data/lib/ops_manager_ui_drivers/version19/state_change_progress.rb +8 -0
  27. data/lib/ops_manager_ui_drivers/version19/user_settings.rb +11 -0
  28. data/lib/ops_manager_ui_drivers/version19/web_ui.rb +112 -0
  29. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57535e264ba62effb509a403a785eaee6b8d51f9
4
- data.tar.gz: 1a7179eb11d23d5f9461df3f03cf7bf427ea0535
3
+ metadata.gz: 5c83639eaff189a9867df3063d538af9c0813d13
4
+ data.tar.gz: d0cf5280e670625b9b7750702090eba3720a8d9c
5
5
  SHA512:
6
- metadata.gz: 2e50f0a3e7068c124313da04fc6ea900f8c7a56e7de2383345507739453e4f7f3ac032ecf9853815429393f01229d0c2df23e2359890298b50b253cb1646dd58
7
- data.tar.gz: 8a813b491b18d2d6698d45bb362f1cbd543c2b16ae202fc590bdcf253aa29911cc4ef57e18d4c64d7f5b43ef732af991f9dc7dc5c889e84d0ae13deba297fd78
6
+ metadata.gz: 2854f84645b4b06b895869f65cf35a9d7debb9ae55dbacc530160c83cf6fa269d0fb54dc73c0a15680b12d149ff047f28f74849c48f6eb27c1945f758d333ecc
7
+ data.tar.gz: 55feab51da86a17c9b0cbcdde60506e8973cade4d642f77ad9537342c4f1c0be1324ad0c9bafa3414709ea60b89dce4eba0fc431d500c60ea76219d6b806c439
@@ -42,6 +42,14 @@ module OpsManagerUiDrivers
42
42
  browser: browser,
43
43
  version_module: Version18,
44
44
  )
45
+ end
46
+
47
+ def om_1_9(ops_manager_url, browser = self)
48
+ @om_1_9 ||= create_web_ui(
49
+ ops_manager_url: ops_manager_url,
50
+ browser: browser,
51
+ version_module: Version19,
52
+ )
45
53
  end
46
54
 
47
55
  def api_1_4(host:, username:, password:)
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.34.1'
2
+ VERSION = '2.35.0'
3
3
  end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/api'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class Api < Version18::Api
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/available_products'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class AvailableProducts < Version18::AvailableProducts
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class AdvancedInfrastructureConfig < Version18::BoshProductSections::AdvancedInfrastructureConfig
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class AvailabilityZones < Version18::BoshProductSections::AvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class BoshProductFormSection < Version18::BoshProductSections::BoshProductFormSection
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class IaasConfiguration < Version18::BoshProductSections::IaasConfiguration
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/networks'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class Networks < Version18::BoshProductSections::Networks
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/bosh_product_sections/subnet'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ module BoshProductSections
6
+ class Subnet < Version18::BoshProductSections::Subnet
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/job_az_and_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class JobAzAndNetworkMappingHelper < Version18::JobAzAndNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/job_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class JobNetworkMappingHelper < Version18::JobNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module OpsManagerUiDrivers
2
+ module Version19
3
+ class JobStatusHelper < Version18::JobStatusHelper
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/ops_manager_director'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class OpsManagerDirector < Version18::OpsManagerDirector
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version18/product_availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class WebUi
6
+ class ProductAvailabilityZones < Version18::WebUi::ProductAvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductConfiguration < Version18::ProductConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_dashboard'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductDashboard < Version18::ProductDashboard
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_errands'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductErrands < Version18::ProductErrands
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_form'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductForm < Version18::ProductForm
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_logs'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductLogs < Version18::ProductLogs
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_resource_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductResourceConfiguration < Version18::ProductResourceConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/product_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class ProductStatusHelper < Version18::ProductStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,103 @@
1
+ require 'ops_manager_ui_drivers/version18/settings'
2
+ using OpsManagerUiDrivers::BackportRefinements
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version19
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 < Version18::Settings::Vcloud
24
+ end
25
+
26
+ class Vsphere < Version18::Settings::Vsphere
27
+ end
28
+
29
+ class AWS < Version18::Settings::AWS
30
+ end
31
+
32
+ class OpenStack < Version18::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/version18/setup'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class Setup < Version18::Setup
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version18/state_change_progress'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class StateChangeProgress < OpsManagerUiDrivers::Version18::StateChangeProgress
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ require 'ops_manager_ui_drivers/version18/user_settings'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version19
5
+ class UserSettings < Version18::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 Version19
6
+ class WebUi
7
+ def initialize(browser:)
8
+ @browser = browser
9
+ end
10
+
11
+ def setup_page
12
+ Version19::Setup.new(browser: browser)
13
+ end
14
+
15
+ def settings_page
16
+ Version19::UserSettings.new(browser: browser)
17
+ end
18
+
19
+ def product_dashboard
20
+ Version19::ProductDashboard.new(browser: browser)
21
+ end
22
+
23
+ def state_change_progress
24
+ Version19::StateChangeProgress.new(browser: browser)
25
+ end
26
+
27
+ def available_products
28
+ Version19::AvailableProducts.new(browser: browser)
29
+ end
30
+
31
+ def ops_manager_director
32
+ Version19::OpsManagerDirector.new(browser: browser)
33
+ end
34
+
35
+ def product_logs_for(product_name)
36
+ Version19::ProductLogs.new(browser: browser, product_name: product_name)
37
+ end
38
+
39
+ def product_resources_configuration(product_name)
40
+ Version19::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
41
+ end
42
+
43
+ def product(product_name)
44
+ Version19::ProductConfiguration.new(browser: browser, product_name: product_name)
45
+ end
46
+
47
+ def product_status_for(product_name)
48
+ Version19::ProductStatusHelper.new(browser: browser, product_name: product_name)
49
+ end
50
+
51
+ def product_availability_zones(product_name)
52
+ Version19::ProductAvailabilityZones.new(browser: browser, product: product_name)
53
+ end
54
+
55
+ def job_azs_and_network_mapping_for(product_name)
56
+ Version19::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.34.1
4
+ version: 2.35.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-09-27 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -304,6 +304,31 @@ files:
304
304
  - lib/ops_manager_ui_drivers/version18/state_change_progress.rb
305
305
  - lib/ops_manager_ui_drivers/version18/user_settings.rb
306
306
  - lib/ops_manager_ui_drivers/version18/web_ui.rb
307
+ - lib/ops_manager_ui_drivers/version19/api.rb
308
+ - lib/ops_manager_ui_drivers/version19/available_products.rb
309
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/advanced_infrastructure_config.rb
310
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/availability_zones.rb
311
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/bosh_product_form_section.rb
312
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/iaas_configuration.rb
313
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/networks.rb
314
+ - lib/ops_manager_ui_drivers/version19/bosh_product_sections/subnet.rb
315
+ - lib/ops_manager_ui_drivers/version19/job_az_and_network_mapping_helper.rb
316
+ - lib/ops_manager_ui_drivers/version19/job_network_mapping_helper.rb
317
+ - lib/ops_manager_ui_drivers/version19/job_status_helper.rb
318
+ - lib/ops_manager_ui_drivers/version19/ops_manager_director.rb
319
+ - lib/ops_manager_ui_drivers/version19/product_availability_zones.rb
320
+ - lib/ops_manager_ui_drivers/version19/product_configuration.rb
321
+ - lib/ops_manager_ui_drivers/version19/product_dashboard.rb
322
+ - lib/ops_manager_ui_drivers/version19/product_errands.rb
323
+ - lib/ops_manager_ui_drivers/version19/product_form.rb
324
+ - lib/ops_manager_ui_drivers/version19/product_logs.rb
325
+ - lib/ops_manager_ui_drivers/version19/product_resource_configuration.rb
326
+ - lib/ops_manager_ui_drivers/version19/product_status_helper.rb
327
+ - lib/ops_manager_ui_drivers/version19/settings.rb
328
+ - lib/ops_manager_ui_drivers/version19/setup.rb
329
+ - lib/ops_manager_ui_drivers/version19/state_change_progress.rb
330
+ - lib/ops_manager_ui_drivers/version19/user_settings.rb
331
+ - lib/ops_manager_ui_drivers/version19/web_ui.rb
307
332
  - lib/ops_manager_ui_drivers/wait_helper.rb
308
333
  - ops_manager_ui_drivers.gemspec
309
334
  homepage: https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers