ops_manager_ui_drivers 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a45a9d8ce771a2a0868b8e5a74e1b1ecd5616f70
4
- data.tar.gz: cfe6c698648d99dc84e517ad87eb6cb7488b4cb0
3
+ metadata.gz: 25f5b2b180ba58b39db5104eb00e0e7795c88d97
4
+ data.tar.gz: 18d2e53b293e2df5797753df4d6a4c8ba17e1ebc
5
5
  SHA512:
6
- metadata.gz: 2d120a99543ead87e7c597b2dc26d0877c313554f68a6888ea58b748a83a83694b4ee5412f16808b1365b9e5f21ca913b60b38f1dff0f777c55cabcef6a749b9
7
- data.tar.gz: ce80f83b4fe05e2160ef955aa7371bbbf632eebb86220fc22c7943653fddc29954f8b2505e0785d8ed242fb3dd6ec2f057f55db08229397f3b68fba64abcda5d
6
+ metadata.gz: 42829865e988073a097674b9d282cc76df6631c869a1a25a465f56d711ea4d5a2d813a618cb2c72416a51809a4f2e3c4553d27959152c87915f3e5e90d3f83d2
7
+ data.tar.gz: c4c1cef0de7d65b3278a41dd26d48943413eb606d958c9f09feb925767fe1f585c2457366b07cc467c97235aa3622ecb6ead851ab50ef452b24752820066dbd3
@@ -1,3 +1,3 @@
1
1
  module OpsManagerUiDrivers
2
- VERSION = '2.20.0'
2
+ VERSION = '2.21.0'
3
3
  end
@@ -31,6 +31,12 @@ module OpsManagerUiDrivers
31
31
  response.find { |credential| credential['name'].starts_with?(job_name) }
32
32
  end
33
33
 
34
+ def director_vm_credentials
35
+ response = JSON.parse(http.request(get("v0/deployed/director/credentials/vm_credentials", uaa_token.auth_header)).read_body)
36
+
37
+ response['credential']['value']
38
+ end
39
+
34
40
  def get_deployed_products
35
41
  JSON.parse(http.request(get('v0/deployed/products', uaa_token.auth_header)).read_body)
36
42
  end
@@ -44,9 +50,16 @@ module OpsManagerUiDrivers
44
50
  end
45
51
 
46
52
  private
53
+ def uaa_uri
54
+ if @host_uri.host == 'localhost' && @host_uri.port == 3000
55
+ URI.parse('http://localhost:8080')
56
+ else
57
+ @host_uri
58
+ end
59
+ end
47
60
 
48
61
  def uaa_token
49
- target_url = @host_uri.to_s + '/uaa'
62
+ target_url = uaa_uri.to_s + '/uaa'
50
63
  token_issuer = CF::UAA::TokenIssuer.new(target_url, 'opsman', nil, {skip_ssl_validation: true})
51
64
  token_issuer.owner_password_grant(@username, @password)
52
65
  end
@@ -111,6 +111,18 @@ module OpsManagerUiDrivers
111
111
  browser.click_on 'Save'
112
112
  end
113
113
 
114
+ def assign_network(iaas_type:, network_name:)
115
+ case iaas_type
116
+ when OpsManagerUiDrivers::AWS_IAAS_TYPE, OpsManagerUiDrivers::OPENSTACK_IAAS_TYPE, OpsManagerUiDrivers::VSPHERE_IAAS_TYPE
117
+ browser.click_on 'Assign AZs and Networks'
118
+ browser.select(network_name, from: 'Network')
119
+ when OpsManagerUiDrivers::VCLOUD_IAAS_TYPE
120
+ browser.click_on 'Assign Networks'
121
+ browser.select(network_name, from: 'Network')
122
+ end
123
+ browser.click_on 'Save'
124
+ end
125
+
114
126
  def configure_vm_passwords(use_generated_passwords: true)
115
127
  browser.click_on 'Security'
116
128
  if use_generated_passwords
@@ -1,6 +1,7 @@
1
1
  require 'ops_manager_ui_drivers/version17/api'
2
2
  require 'uaa'
3
3
  require 'net/http/post/multipart'
4
+ require 'faraday'
4
5
 
5
6
  module OpsManagerUiDrivers
6
7
  module Version18
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_ui_drivers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal, Inc.