ops_manager_ui_drivers 2.10.7 → 2.10.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6be790216fe3d652f22354b70ee56164e126105
4
- data.tar.gz: 3bd63ac78f650992fd266ed63e4de1d161eb8485
3
+ metadata.gz: 8b6965745187ce5e851447e7caf3a34d0a2d7c6e
4
+ data.tar.gz: cdcac36ff4037e0635707d20a830672e7f7eef4e
5
5
  SHA512:
6
- metadata.gz: cd9cefdfe072758256678fb57205e6ddf746370bde8205ee8216049514def12f5df3a0db8f3853e4b48bddf68952a5fc983849284ed1665f878887a23a158b26
7
- data.tar.gz: 0116abc3cf7c7b28c70eec547eac0b44e3fe2ad682e2576e9e1eec10b4306d4bcca282566f0da14816cc6251300b69fdfc7d2270cc5e65667bcb8a3e19e5f56f
6
+ metadata.gz: 24199d649d8dfbcd1caf5c80309796c90734af4cfdb16e3334df475b2a5832534381c591d9fe0af04412fa6b1066a3648b90980150edb3e36fd78c4c54b4f16c
7
+ data.tar.gz: 4b732437fa3911f95f48f9ff9d2330495f8d4256b4044f402cea0aff64f383e81115509c7a37aaa017ccafd6d677d26abd27f6fa15a57573be17de03cfd3dfe3
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.10.7'
2
+ VERSION = '2.10.8'
3
3
  end
@@ -141,9 +141,9 @@ module OpsManagerUiDrivers
141
141
  result = browser.all('.flash-message.error').any? && browser.all('#ignore-install-action').empty?
142
142
  if result
143
143
  Logger.debug 'flash message errors; we expect these to be empty'
144
- Logger.debug browser.all('.flash-message.error').pretty_print_inspect
144
+ Logger.debug browser.all('.flash-message.error').inspect
145
145
  Logger.debug 'ignore install action; we expect there to be one of these'
146
- Logger.debug browser.all('#ignore-install-action').pretty_print_inspect
146
+ Logger.debug browser.all('#ignore-install-action').inspect
147
147
  end
148
148
  result
149
149
  end
@@ -25,6 +25,20 @@ module OpsManagerUiDrivers
25
25
  end
26
26
  end
27
27
 
28
+ def vm_credentials(product_name, job_name)
29
+ product_guid = deployed_product_guid_from_name(product_name)
30
+ response = JSON.parse(http.request(get("v0/deployed/products/#{product_guid}/vm_credentials", uaa_token.auth_header)).read_body)
31
+ response.find { |credential| credential['name'].starts_with?(job_name) }
32
+ end
33
+
34
+ def get_deployed_products
35
+ JSON.parse(http.request(get('v0/deployed/products', uaa_token.auth_header)).read_body)
36
+ end
37
+
38
+ def deployed_product_guid_from_name(name)
39
+ get_deployed_products.find { |product| product['type'] == name }.try(:[], 'guid')
40
+ end
41
+
28
42
  private
29
43
 
30
44
  def uaa_token
@@ -1,8 +1,19 @@
1
- require 'ops_manager_ui_drivers/version17/job_status_helper'
2
-
3
1
  module OpsManagerUiDrivers
4
2
  module Version18
5
- class JobStatusHelper < Version17::JobStatusHelper
3
+ class JobStatusHelper
4
+ def self.from_job_row(job_row)
5
+ ips_string = job_row.find('.actual-ips').text
6
+ ips = ips_string.split(', ')
7
+ az = job_row.all('.az').first.try(:text)
8
+ new(ips: ips, az: az)
9
+ end
10
+
11
+ def initialize(ips:, az:)
12
+ @ips = ips
13
+ @az = az
14
+ end
15
+
16
+ attr_reader :ips, :az
6
17
  end
7
18
  end
8
19
  end
@@ -3,7 +3,33 @@ require 'ops_manager_ui_drivers/version17/product_status_helper'
3
3
  module OpsManagerUiDrivers
4
4
  module Version18
5
5
  class ProductStatusHelper < Version17::ProductStatusHelper
6
+ def job_statuses(job_name_prefix)
7
+ open_page
6
8
 
9
+ wait_for_loading_indicator_to_disappear
10
+
11
+ browser.within "##{product_name}-status" do
12
+ job_rows = browser.all(:css, "tr[data-job-name ^= '#{job_name_prefix}']")
13
+
14
+ job_rows.map { |job_row| Version18::JobStatusHelper.from_job_row(job_row) }
15
+ end
16
+ end
17
+
18
+ def job_status(job_name_prefix)
19
+ job_statuses(job_name_prefix).first
20
+ end
21
+
22
+ def job_status_in_az(_job_name)
23
+ raise 'no longer supported in OM UI Drivers 1.8'
24
+ end
25
+
26
+ def resource_pool_for_job_in_az(_job_name, _az_guid, _vsphere_connection)
27
+ raise 'no longer supported in OM UI Drivers 1.8'
28
+ end
29
+
30
+ def az_name_for_job_in_az(_job_name, _vpc_id, _az_guid)
31
+ raise 'no longer supported in OM UI Drivers 1.8'
32
+ end
7
33
  end
8
34
  end
9
35
  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.10.7
4
+ version: 2.10.8
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-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  version: '0'
313
313
  requirements: []
314
314
  rubyforge_project:
315
- rubygems_version: 2.5.1
315
+ rubygems_version: 2.4.5.1
316
316
  signing_key:
317
317
  specification_version: 4
318
318
  summary: Capybara helpers for configuring Pivotal Ops Manager