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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98878e22947599571b70328db9898022ca77a5bd
4
- data.tar.gz: 1cee24e2e080399e07d80944bfc427897d296b00
3
+ metadata.gz: d970c0fc31cd5c31e9a8f58730685566ddd6966e
4
+ data.tar.gz: 37afb04eae13147372daab1b369384b488eb8501
5
5
  SHA512:
6
- metadata.gz: 6193815b0124e378cc99916c481cd88603b4c5da6c8fb7c5a26bf5780c0be178da699aebd0aabd3adf78ae1d3de6be9615957f9014396c6fa731abe10bcbaa2d
7
- data.tar.gz: 89a55dc98f05720110c34dcabfc85ba29ea1883cd1dd44a452e9ccd870348727312136b328256fafb9e3d2b6aaf844901ebd57c7ea499129ce1fca464d61b846
6
+ metadata.gz: f3e138de6690364ba22d75ec989a64e50c7544dc6c62333369c55c61f0adc8928679761a770c06c85a72e9dc68a6b2a967cd37c1af9777b49be01c721548efa4
7
+ data.tar.gz: e5d69ab680453bbcdff3ceb63f8cb9c06dde78b851afb3a87549dd153781d1377980d230dc14671366f2a6e9ae0f74a42c2e1ecd62c25e8fedf1b7ba2606c997
@@ -1,3 +1,5 @@
1
+ AllCops:
2
+ DisplayCopNames: true
1
3
  Metrics/AbcSize:
2
4
  Max: 50
3
5
  Metrics/ClassLength:
@@ -12,3 +14,6 @@ Style/SignalException:
12
14
  Enabled: false
13
15
  Style/SpaceInsideBrackets:
14
16
  Enabled: false
17
+ Metrics/BlockLength:
18
+ Exclude:
19
+ - "**/*_spec.rb"
@@ -3,7 +3,6 @@ cache: bundler
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 2.0.0
7
6
  - 2.1
8
7
  - 2.2
9
8
 
@@ -1,7 +1,20 @@
1
1
  # Change Log
2
2
 
3
- ## [v2.0.0](https://github.com/chef-partners/kitchen-vra/tree/v2.0.0)
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:
@@ -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', '~> 2'
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'
@@ -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
@@ -18,6 +18,6 @@
18
18
 
19
19
  module Kitchen
20
20
  module Driver
21
- VRA_VERSION = '2.0.0'.freeze
21
+ VRA_VERSION = '2.1.0'.freeze
22
22
  end
23
23
  end
@@ -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.0.0
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: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen