kitchen-vra 2.4.0 → 2.6.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: dc5351db8abc9e1ebed8cd6d250cd6eed5294ac3
4
- data.tar.gz: dadebc21274f1612b11325524295e60e23c6c64d
3
+ metadata.gz: 1a1755122b24800867dba47c9142638866369c71
4
+ data.tar.gz: c0f760021d3605f40680c5d3f69fbb3f761c9750
5
5
  SHA512:
6
- metadata.gz: 1fe82016e8c6bb3042772a7b3dd42ee4d824a6ac06ca43a0e85bb9b4ddd47b6886a22d7372b5ef5e7997e99d2a975130d145fb6d6d35c7eadb87537696dc3178
7
- data.tar.gz: 081cd1c7f6aee2fa0f9577323efb79de324f9e9a2328a15cdeb20336a52f00106b0d96995d21270ec8dd83819f346509f77b4fddc0114b312f7e669ed67c4635
6
+ metadata.gz: 78ea45407ed4b29b58b10da77af9d2525ae7cd9d9b4099dc3102f3cb7708d296865e6e145c69054ee7218203c1c43c52c26760c1f77749f1c396f2ffcbc6aa2a
7
+ data.tar.gz: a17c654055b279fb3cb8d9194942f762a6fec795f6d609e8b3b13afec9b69f05926711367af7b5ff0812907d44b92ca71303af0dab8c835afcd19c8fd5693322
data/CHANGELOG.md CHANGED
@@ -1,19 +1,26 @@
1
1
  # Change Log
2
2
 
3
- ## [2.4.0] (https://github.com/chef-partners/kitchen-vra/tree/v2.4.0) (2018-01-04)
4
- [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.3.0...2.4.0)
3
+ ## [v2.5.0](https://github.com/chef-partners/kitchen-vra/tree/v2.5.0)
5
4
 
6
- **Enhanced/Fixed:**
5
+ [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.4.0...v2.5.0)
7
6
 
8
- - Enhance vRA Kitchen driver to accept Catalog name as an input.
9
- - Ability of vRA Kitchen driver to accept credentials from environment variable even if they are not being mentioned in the `.kitchen.yml` file
10
- - Ability of vRA kitchen driver to prompt for credentials if it’s not able retrieve from `.kitchen.yml` or from environment variable.
11
- - An option to not save credentials based on the usage of an existing flag.
12
- - Fixed a bug in the encryption/decryption logic.
7
+ **Closed issues:**
8
+
9
+ - Feature Query: Support for Capture Snapshot & Restore Snapshot [\#27](https://github.com/chef-partners/kitchen-vra/issues/27)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Accept subtenant name as input in kitchen.yml [\#28](https://github.com/chef-partners/kitchen-vra/pull/28) ([vinuphilip](https://github.com/vinuphilip))
14
+
15
+ ## [v2.4.0](https://github.com/chef-partners/kitchen-vra/tree/v2.4.0) (2018-01-22)
16
+ [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.3.0...v2.4.0)
17
+
18
+ **Merged pull requests:**
13
19
 
20
+ - Kitchen vRA enahancements [\#26](https://github.com/chef-partners/kitchen-vra/pull/26) ([rupeshpatel88](https://github.com/rupeshpatel88))
14
21
 
15
- ## [2.3.0](https://github.com/chef-partners/kitchen-vra/tree/2.3.0) (2017-07-14)
16
- [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.2.0...2.3.0)
22
+ ## [v2.3.0](https://github.com/chef-partners/kitchen-vra/tree/v2.3.0) (2017-07-14)
23
+ [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.2.0...v2.3.0)
17
24
 
18
25
  **Merged pull requests:**
19
26
 
data/README.md CHANGED
@@ -74,6 +74,7 @@ Other options that you can set include:
74
74
  * **memory**: amount of RAM, in MB, the host should have
75
75
  * **requested_for**: the vRA login ID to list as the owner of this resource. Defaults to the vRA username configured in the `driver` section.
76
76
  * **subtenant_id**: the Business Group ID to list as the owner. This is required if the catalog item is a shared/global item; we are unable to determine the subtenant_id from the catalog, and vRA requires it to be set on every request.
77
+ * **subtenant_name**: the Business Group Name as the owner. This can be passed instead of subtenant_id and would act as a more friendly name. subtenant_id would be internally retrieved based on the provided subtenant_name. In case both subtenant_id and subtenant_name are passed, subtenant_name would take the precendence and would try to retrieve subtenant_id based on subtenant_name passed.
77
78
  * **private_key_path**: path to the SSH private key to use when logging in. Defaults to '~/.ssh/id_rsa' or '~/.ssh/id_dsa', preferring the RSA key. Only applies to instances where SSH transport is used; i.e., does not apply to Windows hosts with the WinRM transport configured.
78
79
  * **use_dns**: Defaults to `false`. Set to `true` if vRA doesn't manage vm ip addresses. This will cause kitchen to attempt to connect via hostname.
79
80
  * **dns_suffix**: Defaults to `nil`. Set to your domain suffix, for example 'mydomain.com'. This only takes effect when `use_dns` == true and is appended to the hostname returned by vRA.
@@ -103,6 +104,7 @@ platforms:
103
104
  catalog_name: my_catalog_name_large
104
105
  catalog_id: 1d7c6122-18fa-4ed6-bd13-8a33b6c6ed50
105
106
  cpus: 2
107
+ subtenant_name: my_subtenant_name
106
108
  extra_parameters:
107
109
  provider-mycustompropname:
108
110
  type: string
@@ -38,7 +38,8 @@ module Kitchen
38
38
  default_config :catalog_id, nil
39
39
  default_config :catalog_name, nil
40
40
 
41
- default_config :subtenant, nil
41
+ default_config :subtenant_id, nil
42
+ default_config :subtenant_name, nil
42
43
  default_config :verify_ssl, true
43
44
  default_config :request_timeout, 600
44
45
  default_config :request_refresh_rate, 2
@@ -223,6 +224,17 @@ module Kitchen
223
224
  catalog_request.requested_for = config[:requested_for]
224
225
  catalog_request.lease_days = config[:lease_days] unless config[:lease_days].nil?
225
226
  catalog_request.notes = config[:notes] unless config[:notes].nil?
227
+
228
+ if config[:subtenant_name] != nil
229
+ info('Fetching Subtenant ID by Subtenant Name')
230
+ response = vra_client.fetch_subtenant_items(config[:tenant], config[:subtenant_name])
231
+ parsed_json = JSON.parse(response.body)
232
+ begin
233
+ config[:subtenant_id] = parsed_json['content'][0]['id']
234
+ rescue
235
+ puts "Unable to retrieve Subtenant ID from Subtenant Name: #{config[:subtenant_name]}"
236
+ end
237
+ end
226
238
  catalog_request.subtenant_id = config[:subtenant_id] unless config[:subtenant_id].nil?
227
239
 
228
240
  config[:extra_parameters].each do |key, value_data|
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Kitchen
21
21
  module Driver
22
- VRA_VERSION = '2.4.0'
22
+ VRA_VERSION = '2.6.0'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Partner Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2018-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen