ops_manager_ui_drivers 2.39.0 → 2.40.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ops_manager_ui_drivers/page_helpers.rb +12 -0
  3. data/lib/ops_manager_ui_drivers/version.rb +1 -1
  4. data/lib/ops_manager_ui_drivers/version110/product_dashboard.rb +4 -3
  5. data/lib/ops_manager_ui_drivers/version110/product_errands.rb +6 -3
  6. data/lib/ops_manager_ui_drivers/version111/api.rb +8 -0
  7. data/lib/ops_manager_ui_drivers/version111/available_products.rb +8 -0
  8. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/advanced_infrastructure_config.rb +10 -0
  9. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/availability_zones.rb +10 -0
  10. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/bosh_product_form_section.rb +10 -0
  11. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/iaas_configuration.rb +10 -0
  12. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/networks.rb +10 -0
  13. data/lib/ops_manager_ui_drivers/version111/bosh_product_sections/subnet.rb +10 -0
  14. data/lib/ops_manager_ui_drivers/version111/job_az_and_network_mapping_helper.rb +8 -0
  15. data/lib/ops_manager_ui_drivers/version111/job_network_mapping_helper.rb +8 -0
  16. data/lib/ops_manager_ui_drivers/version111/job_status_helper.rb +8 -0
  17. data/lib/ops_manager_ui_drivers/version111/ops_manager_director.rb +19 -0
  18. data/lib/ops_manager_ui_drivers/version111/product_availability_zones.rb +10 -0
  19. data/lib/ops_manager_ui_drivers/version111/product_configuration.rb +15 -0
  20. data/lib/ops_manager_ui_drivers/version111/product_dashboard.rb +8 -0
  21. data/lib/ops_manager_ui_drivers/version111/product_errands.rb +8 -0
  22. data/lib/ops_manager_ui_drivers/version111/product_form.rb +8 -0
  23. data/lib/ops_manager_ui_drivers/version111/product_logs.rb +8 -0
  24. data/lib/ops_manager_ui_drivers/version111/product_resource_configuration.rb +8 -0
  25. data/lib/ops_manager_ui_drivers/version111/product_status_helper.rb +8 -0
  26. data/lib/ops_manager_ui_drivers/version111/settings.rb +27 -0
  27. data/lib/ops_manager_ui_drivers/version111/setup.rb +8 -0
  28. data/lib/ops_manager_ui_drivers/version111/state_change_progress.rb +8 -0
  29. data/lib/ops_manager_ui_drivers/version111/user_settings.rb +11 -0
  30. data/lib/ops_manager_ui_drivers/version111/web_ui.rb +112 -0
  31. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da61c9c42150aa9081f7cf5372522cac0c38ad66
4
- data.tar.gz: 5c0cfa42da0ac2295b544beabeadfd7a026d8853
3
+ metadata.gz: 45b6918aaa9b5856db966eacce003ca5574aa2f6
4
+ data.tar.gz: eb4eca73ba705ab94b649bad120b99b620853493
5
5
  SHA512:
6
- metadata.gz: b0a9f47efd363554ac1cda74e558da094ab85326002e3c7cb90c946e6e3875ace23a2fba4ab7b08a74b91726753ffb01a9b1873f23eec882489263b7c6935aec
7
- data.tar.gz: 77d88f0ac130aa9b0e70cc833097f9f277720516f44b70ba6a65fa52b72fb257902d356bd67c641e54b53eb4ce3d0968e0e7e00720c86c55278829312ece179e
6
+ metadata.gz: ccde72b02b3990d163ad93eceb0898d0d02ede1aa8601d70f92a8d809ae5d50edeaab7e59f9d742ada30122183f9d20181447f929d98bdbc4e12618502f9ca33
7
+ data.tar.gz: 3cac0350e08a216b4288d42727442825ef4d7e4a770abdceb2701f30a152f05bbf4b5e9e5c6075c4e2f768b1ec5c1e22c8a5e34bb1ba4bee9b30414fa11ff305
@@ -60,6 +60,14 @@ module OpsManagerUiDrivers
60
60
  )
61
61
  end
62
62
 
63
+ def om_1_11(ops_manager_url, browser = self)
64
+ @om_1_11 ||= create_web_ui(
65
+ ops_manager_url: ops_manager_url,
66
+ browser: browser,
67
+ version_module: Version111,
68
+ )
69
+ end
70
+
63
71
  def api_1_4(host:, username:, password:)
64
72
  Version14::Api.new(host_uri: host, username: username, password: password)
65
73
  end
@@ -88,6 +96,10 @@ module OpsManagerUiDrivers
88
96
  Version110::Api.new(host_uri: host, username: username, password: password)
89
97
  end
90
98
 
99
+ def api_1_11(host:, username:, password:)
100
+ Version111::Api.new(host_uri: host, username: username, password: password)
101
+ end
102
+
91
103
  alias_method :om_rc, :om_1_10
92
104
  alias_method :api_rc, :api_1_10
93
105
 
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.39.0'
2
+ VERSION = '2.40.0'
3
3
  end
@@ -53,9 +53,10 @@ module OpsManagerUiDrivers
53
53
  errand_selections.each do |errand_identifier, errand_run_state|
54
54
 
55
55
  state_map = {
56
- true => 0,
57
- false => 1,
58
- 'when-changed' => 2,
56
+ 'default' => 0,
57
+ true => 1,
58
+ false => 2,
59
+ 'when-changed' => 3,
59
60
  }
60
61
 
61
62
  browser.execute_script(
@@ -19,8 +19,9 @@ module OpsManagerUiDrivers
19
19
 
20
20
  browser.all("select[ name^='errands[' ][ name*='][run_errand_' ]").map do |errand|
21
21
  errand_name = errand[:name].match(/errands\[(.*)\]\[run_errand_.*\]/)[1]
22
- selected_option = errand.find('option[selected]')
23
- result << errand_name if selected_option.text == errand_state
22
+ selected_option = errand.all('option[selected]').first
23
+ result << errand_name if selected_option == errand_state
24
+ result << errand_name if selected_option && selected_option.text == errand_state
24
25
  end
25
26
 
26
27
  result
@@ -35,7 +36,9 @@ module OpsManagerUiDrivers
35
36
  private
36
37
 
37
38
  def validate_errand_state(errand_state)
38
- raise "Invalid errand state: #{errand_state.inspect}" unless ['On', 'Off', 'When Changed'].include?(errand_state)
39
+ return if ['On', 'Off', 'When Changed', nil].include?(errand_state)
40
+ return if errand_state =~ /^Default \(On|Off|When Changed\)$/
41
+ raise "Invalid errand state: #{errand_state.inspect}"
39
42
  end
40
43
  end
41
44
  end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/api'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class Api < Version110::Api
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/available_products'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class AvailableProducts < Version110::AvailableProducts
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/advanced_infrastructure_config'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class AdvancedInfrastructureConfig < Version110::BoshProductSections::AdvancedInfrastructureConfig
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class AvailabilityZones < Version110::BoshProductSections::AvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/bosh_product_form_section'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class BoshProductFormSection < Version110::BoshProductSections::BoshProductFormSection
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/iaas_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class IaasConfiguration < Version110::BoshProductSections::IaasConfiguration
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/networks'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class Networks < Version110::BoshProductSections::Networks
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/bosh_product_sections/subnet'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ module BoshProductSections
6
+ class Subnet < Version110::BoshProductSections::Subnet
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/job_az_and_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class JobAzAndNetworkMappingHelper < Version110::JobAzAndNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/job_network_mapping_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class JobNetworkMappingHelper < Version110::JobNetworkMappingHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/job_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class JobStatusHelper < Version110::JobStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ require 'ops_manager_ui_drivers/version110/ops_manager_director'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class OpsManagerDirector < Version110::OpsManagerDirector
6
+ def advanced_infrastructure_config
7
+ @advanced_infrastructure_config ||= Version111::BoshProductSections::AdvancedInfrastructureConfig.new(browser: browser)
8
+ end
9
+
10
+ def availability_zones
11
+ @availability_zones ||= Version111::BoshProductSections::AvailabilityZones.new(browser: browser)
12
+ end
13
+
14
+ def networks
15
+ @networks ||= Version111::BoshProductSections::Networks.new(browser: browser)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,10 @@
1
+ require 'ops_manager_ui_drivers/version110/product_availability_zones'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class WebUi
6
+ class ProductAvailabilityZones < Version110::WebUi::ProductAvailabilityZones
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ require 'ops_manager_ui_drivers/version110/product_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductConfiguration < Version110::ProductConfiguration
6
+ def product_form(form_name)
7
+ Version111::ProductForm.new(browser: browser, product_name: product_name, form_name: form_name)
8
+ end
9
+
10
+ def product_errands
11
+ Version111::ProductErrands.new(browser: browser, product_name: product_name)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_dashboard'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductDashboard < Version110::ProductDashboard
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_errands'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductErrands < Version110::ProductErrands
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_form'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductForm < Version110::ProductForm
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_logs'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductLogs < Version110::ProductLogs
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_resource_configuration'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductResourceConfiguration < Version110::ProductResourceConfiguration
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/product_status_helper'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class ProductStatusHelper < Version110::ProductStatusHelper
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,27 @@
1
+ require 'ops_manager_ui_drivers/version110/settings'
2
+ using OpsManagerUiDrivers::BackportRefinements
3
+
4
+ module OpsManagerUiDrivers
5
+ module Version111
6
+ module Settings
7
+
8
+ class Vcloud < Version110::Settings::Vcloud
9
+ end
10
+
11
+ class Vsphere < Version110::Settings::Vsphere
12
+ end
13
+
14
+ class AWS < Version110::Settings::AWS
15
+ end
16
+
17
+ class OpenStack < Version110::Settings::OpenStack
18
+ end
19
+
20
+ class Google < Version110::Settings::Google
21
+ end
22
+
23
+ class Azure < Version110::Settings::Azure
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/setup'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class Setup < Version110::Setup
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'ops_manager_ui_drivers/version110/state_change_progress'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class StateChangeProgress < OpsManagerUiDrivers::Version110::StateChangeProgress
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ require 'ops_manager_ui_drivers/version110/user_settings'
2
+
3
+ module OpsManagerUiDrivers
4
+ module Version111
5
+ class UserSettings < Version110::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 Version111
6
+ class WebUi
7
+ def initialize(browser:)
8
+ @browser = browser
9
+ end
10
+
11
+ def setup_page
12
+ Version111::Setup.new(browser: browser)
13
+ end
14
+
15
+ def settings_page
16
+ Version111::UserSettings.new(browser: browser)
17
+ end
18
+
19
+ def product_dashboard
20
+ Version111::ProductDashboard.new(browser: browser)
21
+ end
22
+
23
+ def state_change_progress
24
+ Version111::StateChangeProgress.new(browser: browser)
25
+ end
26
+
27
+ def available_products
28
+ Version111::AvailableProducts.new(browser: browser)
29
+ end
30
+
31
+ def ops_manager_director
32
+ Version111::OpsManagerDirector.new(browser: browser)
33
+ end
34
+
35
+ def product_logs_for(product_name)
36
+ Version111::ProductLogs.new(browser: browser, product_name: product_name)
37
+ end
38
+
39
+ def product_resources_configuration(product_name)
40
+ Version111::ProductResourceConfiguration.new(browser: browser, product_name: product_name)
41
+ end
42
+
43
+ def product(product_name)
44
+ Version111::ProductConfiguration.new(browser: browser, product_name: product_name)
45
+ end
46
+
47
+ def product_status_for(product_name)
48
+ Version111::ProductStatusHelper.new(browser: browser, product_name: product_name)
49
+ end
50
+
51
+ def product_availability_zones(product_name)
52
+ Version111::ProductAvailabilityZones.new(browser: browser, product: product_name)
53
+ end
54
+
55
+ def job_azs_and_network_mapping_for(product_name)
56
+ Version111::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.39.0
4
+ version: 2.40.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: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -214,6 +214,31 @@ files:
214
214
  - lib/ops_manager_ui_drivers/version110/state_change_progress.rb
215
215
  - lib/ops_manager_ui_drivers/version110/user_settings.rb
216
216
  - lib/ops_manager_ui_drivers/version110/web_ui.rb
217
+ - lib/ops_manager_ui_drivers/version111/api.rb
218
+ - lib/ops_manager_ui_drivers/version111/available_products.rb
219
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/advanced_infrastructure_config.rb
220
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/availability_zones.rb
221
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/bosh_product_form_section.rb
222
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/iaas_configuration.rb
223
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/networks.rb
224
+ - lib/ops_manager_ui_drivers/version111/bosh_product_sections/subnet.rb
225
+ - lib/ops_manager_ui_drivers/version111/job_az_and_network_mapping_helper.rb
226
+ - lib/ops_manager_ui_drivers/version111/job_network_mapping_helper.rb
227
+ - lib/ops_manager_ui_drivers/version111/job_status_helper.rb
228
+ - lib/ops_manager_ui_drivers/version111/ops_manager_director.rb
229
+ - lib/ops_manager_ui_drivers/version111/product_availability_zones.rb
230
+ - lib/ops_manager_ui_drivers/version111/product_configuration.rb
231
+ - lib/ops_manager_ui_drivers/version111/product_dashboard.rb
232
+ - lib/ops_manager_ui_drivers/version111/product_errands.rb
233
+ - lib/ops_manager_ui_drivers/version111/product_form.rb
234
+ - lib/ops_manager_ui_drivers/version111/product_logs.rb
235
+ - lib/ops_manager_ui_drivers/version111/product_resource_configuration.rb
236
+ - lib/ops_manager_ui_drivers/version111/product_status_helper.rb
237
+ - lib/ops_manager_ui_drivers/version111/settings.rb
238
+ - lib/ops_manager_ui_drivers/version111/setup.rb
239
+ - lib/ops_manager_ui_drivers/version111/state_change_progress.rb
240
+ - lib/ops_manager_ui_drivers/version111/user_settings.rb
241
+ - lib/ops_manager_ui_drivers/version111/web_ui.rb
217
242
  - lib/ops_manager_ui_drivers/version14/api.rb
218
243
  - lib/ops_manager_ui_drivers/version14/availability_zones.rb
219
244
  - lib/ops_manager_ui_drivers/version14/available_products.rb