kitchen-vra 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/.travis.yml +0 -1
- data/CHANGELOG.md +15 -2
- data/README.md +1 -0
- data/kitchen-vra.gemspec +1 -1
- data/lib/kitchen/driver/vra.rb +2 -1
- data/lib/kitchen/driver/vra_version.rb +1 -1
- data/spec/vra_spec.rb +15 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d970c0fc31cd5c31e9a8f58730685566ddd6966e
|
4
|
+
data.tar.gz: 37afb04eae13147372daab1b369384b488eb8501
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3e138de6690364ba22d75ec989a64e50c7544dc6c62333369c55c61f0adc8928679761a770c06c85a72e9dc68a6b2a967cd37c1af9777b49be01c721548efa4
|
7
|
+
data.tar.gz: e5d69ab680453bbcdff3ceb63f8cb9c06dde78b851afb3a87549dd153781d1377980d230dc14671366f2a6e9ae0f74a42c2e1ecd62c25e8fedf1b7ba2606c997
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,20 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [Unreleased](https://github.com/chef-partners/kitchen-vra/tree/HEAD)
|
4
4
|
|
5
|
+
[Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v2.0.0...HEAD)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- extra\_parameters not passing correctly for vRA version 7.X [\#20](https://github.com/chef-partners/kitchen-vra/issues/20)
|
10
|
+
- Failure on notes config setting [\#15](https://github.com/chef-partners/kitchen-vra/issues/15)
|
11
|
+
|
12
|
+
**Merged pull requests:**
|
13
|
+
|
14
|
+
- Bump version for release [\#21](https://github.com/chef-partners/kitchen-vra/pull/21) ([jjasghar](https://github.com/jjasghar))
|
15
|
+
- Add support for a DNS suffix appended to server.name [\#19](https://github.com/chef-partners/kitchen-vra/pull/19) ([jeremymv2](https://github.com/jeremymv2))
|
16
|
+
|
17
|
+
## [v2.0.0](https://github.com/chef-partners/kitchen-vra/tree/v2.0.0) (2016-12-15)
|
5
18
|
[Full Changelog](https://github.com/chef-partners/kitchen-vra/compare/v1.3.0...v2.0.0)
|
6
19
|
|
7
20
|
**Closed issues:**
|
@@ -55,4 +68,4 @@
|
|
55
68
|
|
56
69
|
|
57
70
|
|
58
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
71
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/README.md
CHANGED
@@ -59,6 +59,7 @@ Other options that you can set include:
|
|
59
59
|
* **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.
|
60
60
|
* **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.
|
61
61
|
* **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.
|
62
|
+
* **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.
|
62
63
|
* **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. The vRA REST API expects 'provider-' appended to the front of a property name; 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.
|
63
64
|
|
64
65
|
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:
|
data/kitchen-vra.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'test-kitchen'
|
22
|
-
spec.add_dependency 'vmware-vra',
|
22
|
+
spec.add_dependency 'vmware-vra', '~> 2'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/lib/kitchen/driver/vra.rb
CHANGED
@@ -52,6 +52,7 @@ module Kitchen
|
|
52
52
|
end.compact.first
|
53
53
|
end
|
54
54
|
default_config :use_dns, false
|
55
|
+
default_config :dns_suffix, nil
|
55
56
|
|
56
57
|
def name
|
57
58
|
'vRA'
|
@@ -72,7 +73,7 @@ module Kitchen
|
|
72
73
|
def hostname_for(server)
|
73
74
|
if config[:use_dns]
|
74
75
|
raise 'No server name returned for the vRA request' if server.name.nil?
|
75
|
-
return server.name
|
76
|
+
return config[:dns_suffix] ? "#{server.name}.#{config[:dns_suffix]}" : server.name
|
76
77
|
end
|
77
78
|
|
78
79
|
ip_address = server.ip_addresses.first
|
data/spec/vra_spec.rb
CHANGED
@@ -51,8 +51,7 @@ describe Kitchen::Driver::Vra do
|
|
51
51
|
logger: logger,
|
52
52
|
transport: transport,
|
53
53
|
platform: platform,
|
54
|
-
to_str: 'instance_str'
|
55
|
-
)
|
54
|
+
to_str: 'instance_str')
|
56
55
|
end
|
57
56
|
|
58
57
|
before do
|
@@ -124,6 +123,19 @@ describe Kitchen::Driver::Vra do
|
|
124
123
|
vm?: true)
|
125
124
|
end
|
126
125
|
|
126
|
+
context 'when use_dns is true and dns_suffix is defined' do
|
127
|
+
let(:config) do
|
128
|
+
{
|
129
|
+
use_dns: true,
|
130
|
+
dns_suffix: 'my.com'
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
it 'returns the server name with suffix appended' do
|
135
|
+
expect(driver.hostname_for(server)).to eq('test_hostname.my.com')
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
127
139
|
context 'when use_dns is true' do
|
128
140
|
let(:config) { { use_dns: true } }
|
129
141
|
|
@@ -439,8 +451,7 @@ describe Kitchen::Driver::Vra do
|
|
439
451
|
cpus: 2,
|
440
452
|
memory: 2048,
|
441
453
|
extra_parameters: { 'key1' => { type: 'string', value: 'value1' },
|
442
|
-
'key2' => { type: 'integer', value: 123 }
|
443
|
-
}
|
454
|
+
'key2' => { type: 'integer', value: 123 } }
|
444
455
|
}
|
445
456
|
end
|
446
457
|
|
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
|
+
version: 2.1.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:
|
11
|
+
date: 2017-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|