ops_manager_ui_drivers 2.9.2 → 2.9.3

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 (31) 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/version17/available_products.rb +3 -6
  5. data/lib/ops_manager_ui_drivers/version17/user_settings.rb +0 -1
  6. data/lib/ops_manager_ui_drivers/version18/api.rb +10 -0
  7. data/lib/ops_manager_ui_drivers/version18/available_products.rb +8 -0
  8. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
  9. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones.rb +10 -0
  10. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section.rb +10 -0
  11. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration.rb +10 -0
  12. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/networks.rb +10 -0
  13. data/lib/ops_manager_ui_drivers/version18/bosh_product_sections/subnet.rb +10 -0
  14. data/lib/ops_manager_ui_drivers/version18/job_az_and_network_mapping_helper.rb +8 -0
  15. data/lib/ops_manager_ui_drivers/version18/job_network_mapping_helper.rb +8 -0
  16. data/lib/ops_manager_ui_drivers/version18/job_status_helper.rb +8 -0
  17. data/lib/ops_manager_ui_drivers/version18/ops_manager_director.rb +8 -0
  18. data/lib/ops_manager_ui_drivers/version18/product_availability_zones.rb +10 -0
  19. data/lib/ops_manager_ui_drivers/version18/product_configuration.rb +8 -0
  20. data/lib/ops_manager_ui_drivers/version18/product_dashboard.rb +32 -0
  21. data/lib/ops_manager_ui_drivers/version18/product_errands.rb +8 -0
  22. data/lib/ops_manager_ui_drivers/version18/product_form.rb +8 -0
  23. data/lib/ops_manager_ui_drivers/version18/product_logs.rb +8 -0
  24. data/lib/ops_manager_ui_drivers/version18/product_resource_configuration.rb +8 -0
  25. data/lib/ops_manager_ui_drivers/version18/product_status_helper.rb +9 -0
  26. data/lib/ops_manager_ui_drivers/version18/settings.rb +28 -0
  27. data/lib/ops_manager_ui_drivers/version18/setup.rb +8 -0
  28. data/lib/ops_manager_ui_drivers/version18/state_change_progress.rb +8 -0
  29. data/lib/ops_manager_ui_drivers/version18/user_settings.rb +21 -0
  30. data/lib/ops_manager_ui_drivers/version18/web_ui.rb +112 -0
  31. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0525ec800b3ac2f1117b9c04746fbf62e472148b
4
- data.tar.gz: 1c8cd48b5472af005c9855bbab52ea31f1e0cfc3
3
+ metadata.gz: 5769543a03984d96aef881319cb496f60d1df90c
4
+ data.tar.gz: 04457e3822412f9e8ed3f2d7145dbf21511c7b20
5
5
  SHA512:
6
- metadata.gz: 9a6c49739da2197a4b50916215f5e0f0d31c28538ad039e13afd6b34a5baa05b7ad5b7c76b40ea9da0623050047ba7cc8511d6b675d3a62a54409d502afde7ac
7
- data.tar.gz: 4e6dddb80cf8e54cef21adfc04cd829419a3b406c743610a1537ef50742a84bcf9bdf0b3f08f33c07a2502200a1889d209c2da35d350c5744f4d8ef8450dd0ad
6
+ metadata.gz: 8b2d08bcf28a1b3e9825c43f05a997b31ea68be1af2364eee3a5fb557d830cbf0af3494c94d510a9e4c03eb2c91050bfbf8b9f6cde5571f176e7f0d10e3adc4b
7
+ data.tar.gz: 4b5db6a89a8c8b3a5841d990de35019e4c9bc9f19d8b74fe4056278afedd47358d96ef0123194e932d52f35a5d7ab86b5a7d65f8c09ce42832e24bb92df1c1cd
@@ -36,6 +36,14 @@ module OpsManagerUiDrivers
36
36
  )
37
37
  end
38
38
 
39
+ def om_1_8(ops_manager_url, browser = self)
40
+ @om_1_8 ||= create_web_ui(
41
+ ops_manager_url: ops_manager_url,
42
+ browser: browser,
43
+ version_module: Version18,
44
+ )
45
+ end
46
+
39
47
  def api_1_4(host:, username:, password:)
40
48
  Version14::Api.new(host_uri: host, username: username, password: password)
41
49
  end
@@ -52,8 +60,12 @@ module OpsManagerUiDrivers
52
60
  Version17::Api.new(host_uri: host, username: username, password: password)
53
61
  end
54
62
 
55
- alias_method :om_rc, :om_1_7
56
- alias_method :api_rc, :api_1_7
63
+ def api_1_8(host:, username:, password:)
64
+ Version18::Api.new(host_uri: host, username: username, password: password)
65
+ end
66
+
67
+ alias_method :om_rc, :om_1_8
68
+ alias_method :api_rc, :api_1_8
57
69
 
58
70
  private
59
71
 
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.9.2'
2
+ VERSION = '2.9.3'
3
3
  end
@@ -3,18 +3,15 @@ require 'ops_manager_ui_drivers/wait_helper'
3
3
  module OpsManagerUiDrivers
4
4
  module Version17
5
5
  class AvailableProducts
6
- include WaitHelper
7
-
8
6
  def initialize(browser:)
9
7
  @browser = browser
10
8
  end
11
9
 
12
10
  def add_product_to_install(product_name)
13
11
  browser.visit '/'
14
- poll_up_to_times 3 do
15
- browser.click_on "add-#{product_name}"
16
- browser.find("#show-#{product_name}-configure-action")
17
- end
12
+ browser.find("ul.product-list li.#{product_name}.product").hover
13
+ browser.click_on "add-#{product_name}"
14
+ browser.find("#show-#{product_name}-configure-action")
18
15
  end
19
16
 
20
17
  def product_added?(product_name)
@@ -1,6 +1,5 @@
1
1
  module OpsManagerUiDrivers
2
2
  module Version17
3
-
4
3
  class UserSettings
5
4
  def initialize(browser:)
6
5
  @browser = browser
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/api'
2
+ require 'uaa'
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version18
6
+ class Api < Version17::Api
7
+
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/available_products'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class AvailableProducts < Version17::AvailableProducts
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/advanced_infrastructure_config'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class AdvancedInfrastructureConfig < Version17::BoshProductSections::AdvancedInfrastructureConfig
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class AvailabilityZones < Version17::BoshProductSections::AvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/bosh_product_form_section'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class BoshProductFormSection < Version17::BoshProductSections::BoshProductFormSection
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/iaas_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class IaasConfiguration < Version17::BoshProductSections::IaasConfiguration
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/networks'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class Networks < Version17::BoshProductSections::Networks
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/bosh_product_sections/subnet'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module BoshProductSections
6
+ class Subnet < Version17::BoshProductSections::Subnet
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/job_az_and_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class JobAzAndNetworkMappingHelper < Version17::JobAzAndNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/job_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class JobNetworkMappingHelper < Version17::JobNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/job_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class JobStatusHelper < Version17::JobStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/ops_manager_director'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class OpsManagerDirector < Version17::OpsManagerDirector
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version17/product_availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class WebUi
6
+ class ProductAvailabilityZones < Version17::WebUi::ProductAvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/product_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductConfiguration < Version17::ProductConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,32 @@
1
+ require 'ops_manager_ui_drivers/version17/product_dashboard'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductDashboard < Version17::ProductDashboard
6
+ def delete_whole_installation
7
+ method_deprecated!
8
+ end
9
+
10
+ def delete_installation_available?
11
+ method_deprecated!
12
+ end
13
+
14
+ def reset_state(ops_manager)
15
+ revert_pending_changes if revert_available?
16
+ if ops_manager.settings_page.delete_installation_available?
17
+ ops_manager.settings_page.delete_whole_installation_on_next_apply_updates
18
+ apply_updates
19
+ browser.poll_up_to_mins(15) do
20
+ browser.expect(ops_manager.state_change_progress).to browser.be_state_change_success
21
+ end
22
+ end
23
+ end
24
+
25
+ private
26
+
27
+ def method_deprecated!
28
+ raise NotImplementedError, 'This method has been removed. You can find the new version on the UserSettings class'
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/product_errands'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductErrands < Version17::ProductErrands
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/product_form'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductForm < Version17::ProductForm
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/product_logs'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductLogs < Version17::ProductLogs
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/product_resource_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductResourceConfiguration < Version17::ProductResourceConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ require 'ops_manager_ui_drivers/version17/product_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class ProductStatusHelper < Version17::ProductStatusHelper
6
+
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,28 @@
1
+ require 'ops_manager_ui_drivers/version17/settings'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ module Settings
6
+ def self.for(test_settings)
7
+ iaas_type = test_settings.dig('iaas_type')
8
+ settings_class =
9
+ [Vcloud, Vsphere, AWS, OpenStack].find do |klass|
10
+ klass.works_with?(iaas_type)
11
+ end or fail("Unsupported IaaS: #{iaas_type.inspect}")
12
+ settings_class.new(test_settings)
13
+ end
14
+
15
+ class Vcloud < Version17::Settings::Vcloud
16
+ end
17
+
18
+ class Vsphere < Version17::Settings::Vsphere
19
+ end
20
+
21
+ class AWS < Version17::Settings::AWS
22
+ end
23
+
24
+ class OpenStack < Version17::Settings::OpenStack
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/setup'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class Setup < Version17::Setup
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version17/state_change_progress'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class StateChangeProgress < OpsManagerUiDrivers::Version17::StateChangeProgress
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,21 @@
1
+ require 'ops_manager_ui_drivers/version17/user_settings'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version18
5
+ class UserSettings < Version17::UserSettings
6
+ def delete_whole_installation_on_next_apply_updates
7
+ browser.visit '/advanced_tools'
8
+ browser.click_on 'show-delete-installation-modal-action'
9
+ browser.click_on 'delete-installation-action'
10
+ end
11
+
12
+ def delete_installation_available?
13
+ browser.visit '/advanced_tools'
14
+ browser.all('#show-delete-installation-modal-action').any?
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+
21
+
@@ -0,0 +1,112 @@
1
+ require 'net/https'
2
+ require 'date'
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version18
6
+ class WebUi
7
+ def initialize(browser:)
8
+ @browser = browser
9
+ end
10
+
11
+ def setup_page
12
+ Version18::Setup.new(browser: browser)
13
+ end
14
+
15
+ def settings_page
16
+ Version18::UserSettings.new(browser: browser)
17
+ end
18
+
19
+ def product_dashboard
20
+ Version18::ProductDashboard.new(browser: browser)
21
+ end
22
+
23
+ def state_change_progress
24
+ Version18::StateChangeProgress.new(browser: browser)
25
+ end
26
+
27
+ def available_products
28
+ Version18::AvailableProducts.new(browser: browser)
29
+ end
30
+
31
+ def ops_manager_director
32
+ Version18::OpsManagerDirector.new(browser: browser)
33
+ end
34
+
35
+ def product_logs_for(product_name)
36
+ Version18::ProductLogs.new(browser: browser, product_name: product_name)
37
+ end
38
+
39
+ def product_resources_configuration(product_name)
40
+ Version18::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
41
+ end
42
+
43
+ def product(product_name)
44
+ Version18::ProductConfiguration.new(browser: browser, product_name: product_name)
45
+ end
46
+
47
+ def product_status_for(product_name)
48
+ Version18::ProductStatusHelper.new(browser: browser, product_name: product_name)
49
+ end
50
+
51
+ def product_availability_zones(product_name)
52
+ Version18::ProductAvailabilityZones.new(browser: browser, product: product_name)
53
+ end
54
+
55
+ def job_azs_and_network_mapping_for(product_name)
56
+ Version18::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.9.2
4
+ version: 2.9.3
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-03-17 00:00:00.000000000 Z
11
+ date: 2016-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -264,6 +264,31 @@ files:
264
264
  - lib/ops_manager_ui_drivers/version17/state_change_progress.rb
265
265
  - lib/ops_manager_ui_drivers/version17/user_settings.rb
266
266
  - lib/ops_manager_ui_drivers/version17/web_ui.rb
267
+ - lib/ops_manager_ui_drivers/version18/api.rb
268
+ - lib/ops_manager_ui_drivers/version18/available_products.rb
269
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/advanced_infrastructure_config.rb
270
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/availability_zones.rb
271
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/bosh_product_form_section.rb
272
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/iaas_configuration.rb
273
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/networks.rb
274
+ - lib/ops_manager_ui_drivers/version18/bosh_product_sections/subnet.rb
275
+ - lib/ops_manager_ui_drivers/version18/job_az_and_network_mapping_helper.rb
276
+ - lib/ops_manager_ui_drivers/version18/job_network_mapping_helper.rb
277
+ - lib/ops_manager_ui_drivers/version18/job_status_helper.rb
278
+ - lib/ops_manager_ui_drivers/version18/ops_manager_director.rb
279
+ - lib/ops_manager_ui_drivers/version18/product_availability_zones.rb
280
+ - lib/ops_manager_ui_drivers/version18/product_configuration.rb
281
+ - lib/ops_manager_ui_drivers/version18/product_dashboard.rb
282
+ - lib/ops_manager_ui_drivers/version18/product_errands.rb
283
+ - lib/ops_manager_ui_drivers/version18/product_form.rb
284
+ - lib/ops_manager_ui_drivers/version18/product_logs.rb
285
+ - lib/ops_manager_ui_drivers/version18/product_resource_configuration.rb
286
+ - lib/ops_manager_ui_drivers/version18/product_status_helper.rb
287
+ - lib/ops_manager_ui_drivers/version18/settings.rb
288
+ - lib/ops_manager_ui_drivers/version18/setup.rb
289
+ - lib/ops_manager_ui_drivers/version18/state_change_progress.rb
290
+ - lib/ops_manager_ui_drivers/version18/user_settings.rb
291
+ - lib/ops_manager_ui_drivers/version18/web_ui.rb
267
292
  - lib/ops_manager_ui_drivers/wait_helper.rb
268
293
  - ops_manager_ui_drivers.gemspec
269
294
  homepage: https://github.com/pivotal-cf-experimental/ops_manager_ui_drivers