chef-provisioning-vra 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +3 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile +1 -0
- data/Rakefile +1 -0
- data/chef-provisioning-vra.gemspec +2 -1
- data/lib/chef/provisioning/driver_init/vra.rb +1 -0
- data/lib/chef/provisioning/vra_driver/driver.rb +4 -3
- data/lib/chef/provisioning/vra_driver/version.rb +2 -1
- data/spec/unit/chef/provisioning/vra_driver/driver_spec.rb +6 -8
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42fa518cf8b23325dc512daac2222a62d39a453b
|
4
|
+
data.tar.gz: a9df8f9ce0d715c8369494c6e6126b7288f6d2b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbafc215699dc61c794a41bf356eaf415ed21ba6b592a4e05fda115d78b0dbc3827f582d9ef8892b8f9e2f493520d10803278cf15cf60b4f9f68af6cf52a5089
|
7
|
+
data.tar.gz: df53bb1faca9ec5a554f70246559a88762cc81a93b9523fbb91d5bb9021a9e488d885716ec6db83b59905bf97288ed9c3c1ecfeb11dba85643f8d11744d36bb9
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -3,9 +3,8 @@ cache: bundler
|
|
3
3
|
sudo: false
|
4
4
|
|
5
5
|
rvm:
|
6
|
-
- 2.
|
7
|
-
- 2.1
|
8
|
-
- 2.2
|
6
|
+
- 2.2.2
|
7
|
+
- 2.3.1
|
9
8
|
|
10
9
|
branches:
|
11
10
|
only:
|
@@ -16,4 +15,4 @@ notifications:
|
|
16
15
|
on_success: change
|
17
16
|
on_failure: always
|
18
17
|
rooms:
|
19
|
-
secure:
|
18
|
+
secure: "YViCAUlIVPpsCmzHYk4V0tJ2+WOXdzwypNFDSJTCclUPdI1VTovwv+tJ//+HmNuUGbdo7ouvgF2Cv0i87R5E7KPcqkFAjt+i8PIMgEF4tzXB4tX6j8uD4T1MDjBr/JKxC/DEifY7OlVfQdwYDj669jtGkPARYOo7DCt4/+eHtbCt2SskDJqksU0UY58e+CMjKKXxQOtETA/YdOI1iInsqMSbbVRBWelvJfd5pLzHE4g8qFLxFXjioAca+ScY4pqjfFHrNOqyQL/DvfQ4BAboUujFnbRcdU0NimRlh4nIr7d9uGhoXkJbox/XRPQtUYlIP+aguzrrlsjlA10cTA3QU1+1kXEInhf75hXmJ1agy2cYXVsKmGhWXktTl9TulEzLiUJyWjMnskxOKq6hjS0pSmVLicRYUcI4P6c67FF2OU28y/6Ndxggq2qFPtal22wQ/Y1Qgzu7AkkU1+EynqeFmE21G9iMkTC5Nr0yZ7PyHgwrkQXmSYVHw+WkPQibovGJZZZCeyOuFSa0f/OmD9dtBVHIFYKoN7W2iQf9HR4/fgnKpEzfb78b4d3S0MXsV2hdawle8zjooRK2IsRDAtakV+u9jCgQP7a9hPMBQKrQHCInRRRzenANIEK6z/HID4BfotV5YV+c25Qzp+I6iPHQgVbsU+R0gmCRiMxXlG2oV80="
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# chef-provisioning-vra CHANGELOG
|
2
2
|
|
3
|
+
## v1.0.0 (2016-12-15)
|
4
|
+
|
5
|
+
* Updated to the new `vmware-vra` gem. Now supports 7.0+ vRA.
|
6
|
+
|
3
7
|
## v0.3.0 (2016-01-06)
|
4
8
|
|
5
9
|
* [pr#7](https://github.com/chef-partners/chef-provisioning-vra/pull/7) Storing the vRA resource (host) name in the Chef node object so it can be displayed/queried in cases where the machine resource name does not match the vRA-generated hostname
|
@@ -15,4 +19,3 @@
|
|
15
19
|
|
16
20
|
## v0.1.0
|
17
21
|
* Initial release
|
18
|
-
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'chef/provisioning/vra_driver/version'
|
@@ -19,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.require_paths = ['lib']
|
20
21
|
|
21
22
|
spec.add_dependency 'chef-provisioning'
|
22
|
-
spec.add_dependency 'vmware-vra', '~>
|
23
|
+
spec.add_dependency 'vmware-vra', '~> 2.0'
|
23
24
|
|
24
25
|
spec.add_development_dependency 'chef', '>= 12'
|
25
26
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
|
@@ -152,7 +153,7 @@ class Chef
|
|
152
153
|
|
153
154
|
servers = submitted_request.resources.select(&:vm?)
|
154
155
|
raise 'The vRA request created more than one server. The catalog blueprint should only return one.' if servers.size > 1
|
155
|
-
raise 'the vRA request did not create any servers.' if servers.size
|
156
|
+
raise 'the vRA request did not create any servers.' if servers.size.zero?
|
156
157
|
|
157
158
|
servers.first
|
158
159
|
end
|
@@ -231,7 +232,7 @@ class Chef
|
|
231
232
|
driver_options.fetch(:max_retries, 1).to_i
|
232
233
|
end
|
233
234
|
|
234
|
-
def wait_for(action_handler
|
235
|
+
def wait_for(action_handler)
|
235
236
|
sleep_time = 5
|
236
237
|
start_time = Time.now.utc.to_i
|
237
238
|
try = 0
|
@@ -239,7 +240,7 @@ class Chef
|
|
239
240
|
Timeout.timeout(max_wait_time) do
|
240
241
|
loop do
|
241
242
|
begin
|
242
|
-
return if
|
243
|
+
return if yield == true
|
243
244
|
rescue => e
|
244
245
|
action_handler.report_progress("Error encountered: #{e.class} - #{e.message}")
|
245
246
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
|
@@ -19,7 +20,7 @@
|
|
19
20
|
class Chef
|
20
21
|
module Provisioning
|
21
22
|
module VraDriver
|
22
|
-
VERSION = '0.
|
23
|
+
VERSION = '1.0.0'.freeze
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
3
4
|
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
|
@@ -21,10 +22,10 @@ require 'chef/provisioning/vra_driver/driver'
|
|
21
22
|
|
22
23
|
module TestHelpers
|
23
24
|
class ActionHandler
|
24
|
-
def perform_action(_msg
|
25
|
+
def perform_action(_msg)
|
25
26
|
raise 'perform_action called without a block' unless block_given?
|
26
27
|
|
27
|
-
|
28
|
+
yield
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
@@ -691,8 +692,7 @@ describe Chef::Provisioning::VraDriver::Driver do
|
|
691
692
|
expect(Chef::Provisioning::Transport::WinRM).to receive(:new).with('http://test-host:5985/wsman',
|
692
693
|
:plaintext,
|
693
694
|
winrm_options,
|
694
|
-
config
|
695
|
-
).and_return(transport)
|
695
|
+
config).and_return(transport)
|
696
696
|
|
697
697
|
expect(driver.create_winrm_transport(machine_spec, machine_options, resource)).to eq(transport)
|
698
698
|
end
|
@@ -746,8 +746,7 @@ describe Chef::Provisioning::VraDriver::Driver do
|
|
746
746
|
'test_username',
|
747
747
|
ssh_options,
|
748
748
|
options,
|
749
|
-
config
|
750
|
-
).and_return(transport)
|
749
|
+
config).and_return(transport)
|
751
750
|
|
752
751
|
expect(driver.create_ssh_transport(machine_spec, machine_options, resource)).to eq(transport)
|
753
752
|
end
|
@@ -988,8 +987,7 @@ describe Chef::Provisioning::VraDriver::Driver do
|
|
988
987
|
username: 'test_username',
|
989
988
|
password: 'test_password',
|
990
989
|
tenant: 'test_tenant',
|
991
|
-
verify_ssl: true
|
992
|
-
).and_return(client)
|
990
|
+
verify_ssl: true).and_return(client)
|
993
991
|
|
994
992
|
expect(driver.vra_client).to eq(client)
|
995
993
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-vra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.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-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-provisioning
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.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: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: chef
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,10 +149,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.5.1
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: A Chef Provisioning driver for VMware vRealize Automation (vRA)
|
156
156
|
test_files:
|
157
157
|
- spec/unit/chef/provisioning/vra_driver/driver_spec.rb
|
158
|
-
has_rdoc:
|