kitchen-vra 3.0.1 → 3.1.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
  SHA256:
3
- metadata.gz: b4d867c4c40278ede310114028b5adac346d694f8ff51b94a2b6a22ce9ad81ed
4
- data.tar.gz: cd585930793bd9e668e23c0744c0632833d8ee572d5715d6ca2527653e943d74
3
+ metadata.gz: 42841b378dc1efcd266d40f01990f7dedc82e8e3d49e742d3268e0cca5c21049
4
+ data.tar.gz: fdd7dfe3c395a460cb92414617a990006508007230aa25c4995af63edadc6a0e
5
5
  SHA512:
6
- metadata.gz: 1f5c83ba324e3ad87b1dc792e7fc137f239bc8e6de6e5a244e2c92d0df5f614d5fa5c9605f6e91c94fdebe6e305a41fdff40332793858b10d729e40e0e561376
7
- data.tar.gz: 29607ec9d52027f6bd67331d157f6d41aee6a647ff3fba5fcc12f5f5befee78da7744bf151bf455d5698f4619cde9f4daa4264b5b29f92f02219bef4ab96086f
6
+ metadata.gz: c8742b99fef04d72bd9cd87357ff1d6e30971e5afa70ed3ecadec371a705e7505aafbb38cc655a75e6fab47b2089c61a2323fa1bf084e468913aa852d23c4601
7
+ data.tar.gz: 76d046c6da25ef7c78379bf0c64bb49c3c438cf7f62a05b3a5da49a1c2057b7a5a4d7fbae6b00aac1db2adaa6bf8cd2d1ac84d28f67bc27ab04dea1b139ec6b7
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.1.0](https://github.com/chef-partners/kitchen-vra/tree/v3.1.0)
4
+
5
+ [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v3.0.1...v3.1.0)
6
+
7
+ - Move usage documentation from the readme to the kitchen.ci website
8
+ - Make the version configuration optional
9
+ - Remove the bundler dev dep
10
+ - Update the gemspec for the new maintainer of this project
11
+
3
12
  ## [v3.0.1](https://github.com/chef-partners/kitchen-vra/tree/v3.0.1)
4
13
 
5
14
  [Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v3.0.0...v3.0.1)
data/README.md CHANGED
@@ -22,107 +22,9 @@ Or even better, install it via ChefDK:
22
22
 
23
23
  $ chef gem install kitchen-vra
24
24
 
25
- ## Usage
26
-
27
- After installing the gem as described above, edit your .kitchen.yml file to set the driver to 'vra' and supply your login credentials:
28
-
29
- ```yaml
30
- driver:
31
- name: vra
32
- username: myuser@corp.local
33
- password: mypassword
34
- tenant: mytenant
35
- base_url: https://vra.corp.local
36
- verify_ssl: true
37
- ```
38
-
39
- If you want username and password to be prompted, remove usename and password in your .kitchen.yml as shown below:
40
-
41
- ```yaml
42
- driver:
43
- name: vra
44
- tenant: mytenant
45
- base_url: https://vra.corp.local
46
- verify_ssl: true
47
- ```
48
- If you don't want to explicitly specify username and password in the kitchen.yml, you have an option to set it in the environment variable as
49
-
50
- $ export VRA_USER_NAME='myuser@corp.local'
51
- $ export VRA_USER_PASSWORD='mypassword'
52
-
53
- Then configure your platforms. You will need to specify project_id, image_mapping, flavor_mapping and version for the platform. image_mapping specifies the OS image for a machine and the flavor_mapping specifies the CPU count and RAM of the machine. Either a catalog_id or a catalog_name is required for each platform. If both catalog_id and catalog_name are mentioned in .kitchen.yml then catalog_name would be used to derive the catalog_id and this catalog_id would override the catalog_id being passed in .kitchen.yml. In the below example as can be seen we are using catalog_id for centos6 driver while catalog_name for the centos7 driver just to demonstrate that we can use either of the two.
54
-
55
-
56
- ```yaml
57
- platforms:
58
- - name: centos6
59
- driver:
60
- catalog_id: e9db1084-d1c6-4c1f-8e3c-eb8f3dc574f9
61
- project_id: 6ba69375-79d5-42c3-a099-7d32739f71a9
62
- image_mapping: SQL 2016
63
- flavor_mapping: Small
64
- version: 1
65
- - name: centos7
66
- driver:
67
- catalog_name: my_catalog_name
68
- project_id: 6ba69375-79d5-42c3-a099-7d32739f71a9
69
- image_mapping: VRA-nc-lnx-ce8.4-Docker
70
- flavor_mapping: Small
71
- version: 1
72
- ```
73
-
25
+ ## Configuration
74
26
 
75
-
76
- Other options that you can set include:
77
-
78
- * **request_timeout**: amount of time, in seconds, to wait for a vRA request to complete. Default is 600 seconds.
79
- * **server_ready_retries**: Number of times to retry the "waiting for server to be ready" check. In some cases, this will error out immediately due to DNS propagation issues, etc. Setting this to a number greater than 0 will retry the `wait_until_ready` method with a growing sleep in between each attempt. Defaults to 1. Set to 0 to disable any retrying of the `wait_until_ready` method.
80
- * **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.
81
- * **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.
82
- * **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.
83
- * **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.
84
- * **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.
85
- * **extra_parameters**: a hash of other data to set on a catalog request, most notably custom properties. Allows updates to existing properties on the blueprint as well as the addition of new properties. Each key in the hash is the property name, and the value is a another hash containing the value data type and the value itself. It is possible to use a `~` to add nested parameters.
86
-
87
- These settings can be set globally under the top-level `driver` section, or they can be set on each platform, which allows you to set globals and then override them. For example, this configuration would set the CPU count to 1 except on the "large" platform:
88
-
89
- ```yaml
90
- driver:
91
- name: vra
92
-
93
- platforms:
94
- - name: small
95
- driver:
96
- catalog_name: my_catalog_name_small
97
- catalog_id: 8a189191-fea6-43eb-981e-ee0fa40f8f57
98
- project_id: 6ba69375-79d5-42c3-a099-7d32739f71a9
99
- image_mapping: SQL 2016
100
- flavor_mapping: Small
101
- version: 1
102
- extra_parameters:
103
- mycustompropname:
104
- type: string
105
- value: smallvalue
106
- Vrm.DataCenter.Location:
107
- type: string
108
- value: Non-Prod
109
- - name: large
110
- driver:
111
- catalog_name: my_catalog_name_large
112
- catalog_id: 1d7c6122-18fa-4ed6-bd13-8a33b6c6ed50
113
- project_id: 6ba69375-79d5-42c3-a099-7d32739f71a9
114
- image_mapping: VRA-nc-lnx-ce8.4-Docker
115
- flavor_mapping: Large
116
- version: 1
117
- subtenant_name: my_subtenant_name
118
- extra_parameters:
119
- mycustompropname:
120
- type: string
121
- value: largevalue
122
- Vrm.DataCenter.Location:
123
- type: string
124
- value: Prod
125
- ```
27
+ See the [kitchen.ci kitchen-vra docs](https://kitchen.ci/docs/drivers/vra/) for a complete list of configuration options.
126
28
 
127
29
  ## License and Authors
128
30
 
data/kitchen-vra.gemspec CHANGED
@@ -7,11 +7,11 @@ require "kitchen/driver/vra_version"
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "kitchen-vra"
9
9
  spec.version = Kitchen::Driver::VRA_VERSION
10
- spec.authors = ["Chef Partner Engineering"]
11
- spec.email = ["partnereng@chef.io"]
10
+ spec.authors = ["Chef Commmunity Tools Team"]
11
+ spec.email = ["oss@chef.io"]
12
12
  spec.summary = "A Test Kitchen driver for VMware vRealize Automation (vRA)"
13
13
  spec.description = spec.summary
14
- spec.homepage = "https://github.com/chef-partners/kitchen-vra"
14
+ spec.homepage = "https://github.com/test-kitchen/kitchen-vra"
15
15
  spec.license = "Apache-2.0"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0")
@@ -22,11 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = ">= 2.7"
23
23
 
24
24
  spec.add_dependency "test-kitchen"
25
- spec.add_dependency "vmware-vra", "~> 3.0" # 3.0 required for vRA 8.x
25
+ spec.add_dependency "vmware-vra", ">= 3.1.0" # 3.0 required for vRA 8.x
26
26
  spec.add_dependency "highline"
27
27
  spec.add_dependency "rack", ">= 1.6", "< 3.0"
28
28
  spec.add_dependency "ffi-yajl", ">= 2.2.3", "< 2.5.0"
29
- spec.add_development_dependency "bundler", ">= 1.7"
30
29
  spec.add_development_dependency "rake", "~> 13.0"
31
30
  spec.add_development_dependency "rspec", "~> 3.2"
32
31
  spec.add_development_dependency "simplecov", "~> 0.10"
@@ -39,8 +39,8 @@ module Kitchen
39
39
  required_config :project_id
40
40
  required_config :image_mapping
41
41
  required_config :flavor_mapping
42
- required_config :version
43
42
 
43
+ default_config :version, nil
44
44
  default_config :catalog_id, nil
45
45
  default_config :catalog_name, nil
46
46
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  #
4
4
  # Author:: Chef Partner Engineering (<partnereng@chef.io>)
5
- # Copyright:: Copyright (c) 2015 Chef Software, Inc.
5
+ # Copyright:: Copyright (c) Chef Software, Inc.
6
6
  # License:: Apache License, Version 2.0
7
7
  #
8
8
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Kitchen
22
22
  module Driver
23
- VRA_VERSION = "3.0.1"
23
+ VRA_VERSION = "3.1.0"
24
24
  end
25
25
  end
data/spec/vra_spec.rb CHANGED
@@ -44,7 +44,6 @@ describe Kitchen::Driver::Vra do
44
44
  subtenant_id: "160b473a-0ec9-473d-8156-28dd96c0b6b7",
45
45
  use_dns: false,
46
46
  deployment_name: "test-instance",
47
- version: 1,
48
47
  }
49
48
  end
50
49
 
@@ -421,7 +420,6 @@ describe Kitchen::Driver::Vra do
421
420
  project_id: "6ba69375-79d5-42c3-a099-7d32739f71a7",
422
421
  image_mapping: "VRA-nc-lnx-ce8.4-Docker",
423
422
  flavor_mapping: "Small",
424
- version: 1,
425
423
  }
426
424
  end
427
425
 
@@ -442,15 +440,14 @@ describe Kitchen::Driver::Vra do
442
440
  project_id: "6ba69375-79d5-42c3-a099-7d32739f71a7",
443
441
  image_mapping: "VRA-nc-lnx-ce8.4-Docker",
444
442
  flavor_mapping: "Small",
445
- version: 1,
446
443
  extra_parameters: { "key1" => { type: "string", value: "value1" },
447
444
  "key2" => { type: "integer", value: 123 } },
448
445
  }
449
446
  end
450
447
 
451
448
  it "sets extra parmeters" do
452
- expect(catalog_request).to receive(:set_parameters).with("key1", type: "string", value: "value1")
453
- expect(catalog_request).to receive(:set_parameters).with("key2", type: "integer", value: 123)
449
+ expect(catalog_request).to receive(:set_parameters).with("key1", { type: "string", value: "value1" })
450
+ expect(catalog_request).to receive(:set_parameters).with("key2", { type: "integer", value: 123 })
454
451
  driver.catalog_request
455
452
  end
456
453
  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: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
- - Chef Partner Engineering
7
+ - Chef Commmunity Tools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-19 00:00:00.000000000 Z
11
+ date: 2022-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: vmware-vra
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: 3.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: 3.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: highline
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -92,20 +92,6 @@ dependencies:
92
92
  - - "<"
93
93
  - !ruby/object:Gem::Version
94
94
  version: 2.5.0
95
- - !ruby/object:Gem::Dependency
96
- name: bundler
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: '1.7'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- version: '1.7'
109
95
  - !ruby/object:Gem::Dependency
110
96
  name: rake
111
97
  requirement: !ruby/object:Gem::Requirement
@@ -178,7 +164,7 @@ dependencies:
178
164
  version: 2.2.1
179
165
  description: A Test Kitchen driver for VMware vRealize Automation (vRA)
180
166
  email:
181
- - partnereng@chef.io
167
+ - oss@chef.io
182
168
  executables: []
183
169
  extensions: []
184
170
  extra_rdoc_files: []
@@ -188,6 +174,7 @@ files:
188
174
  - ".github/dependabot.yml"
189
175
  - ".github/workflows/ci.yml"
190
176
  - ".gitignore"
177
+ - ".rubocop.yml"
191
178
  - CHANGELOG.md
192
179
  - Gemfile
193
180
  - LICENSE.txt
@@ -198,7 +185,7 @@ files:
198
185
  - lib/kitchen/driver/vra_version.rb
199
186
  - spec/spec_helper.rb
200
187
  - spec/vra_spec.rb
201
- homepage: https://github.com/chef-partners/kitchen-vra
188
+ homepage: https://github.com/test-kitchen/kitchen-vra
202
189
  licenses:
203
190
  - Apache-2.0
204
191
  metadata: {}