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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eb0c1cab46c0ae9ce9dfd950b6df107e5a62f9a
4
- data.tar.gz: 41946885e334770fea2ed6eef23fa18a4b90abc9
3
+ metadata.gz: 42fa518cf8b23325dc512daac2222a62d39a453b
4
+ data.tar.gz: a9df8f9ce0d715c8369494c6e6126b7288f6d2b7
5
5
  SHA512:
6
- metadata.gz: 40513beefd8d65fc8d6c9136ff62df17268bac2dd8a20faefebb884346db7d0adffac7bd8c842930784d82bc0fe9e95a7cac136c44ce574c889cb27eeeab580b
7
- data.tar.gz: 08aaac02fb78f1b89e47dcb29086097c6e0fdeeb76e6a1a13eb1a73513ae37a7ddb2c8fb413186e0a1a7cfd0a2cce4ab9f65939b5f635e51156bb3ff4657cd61
6
+ metadata.gz: bbafc215699dc61c794a41bf356eaf415ed21ba6b592a4e05fda115d78b0dbc3827f582d9ef8892b8f9e2f493520d10803278cf15cf60b4f9f68af6cf52a5089
7
+ data.tar.gz: df53bb1faca9ec5a554f70246559a88762cc81a93b9523fbb91d5bb9021a9e488d885716ec6db83b59905bf97288ed9c3c1ecfeb11dba85643f8d11744d36bb9
data/.gitignore CHANGED
@@ -7,3 +7,6 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /.direnv/
11
+ /.envrc
12
+ /.ruby-version
@@ -3,9 +3,8 @@ cache: bundler
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 2.0.0
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: iESaLLqy5RK9os0fB83vXF0DgmMaWE8/tuhEg6rL6m2YlHq+mHwT5Hoc+YIFHbzl4PXS07i99ICFpGiUX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mE21G9iMkTC5Nr0yZ7PyHgwrkQXmSYVHw+WkPQibovGJZZZCeyOuFSa0f/OmD9dtBVHIFYKoN7W2iQf9HR4/fgnKpEzfb78b4d3S0MXsV2hdawle8zjooRK2IsRDAtakV+u9jCgQP7a9hPMBQKrQHCInRRRzenANIEK6z/HID4BfotV5YV+c25Qzp+I6iPHQgVbsU+R0gmCRiMxXlG2oV80="
@@ -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
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  source 'https://rubygems.org'
2
3
 
3
4
  # Specify your gem's dependencies in chef-provisioning-vra.gemspec
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
  require 'rubocop/rake_task'
@@ -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', '~> 1.3'
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.
@@ -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 == 0
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, &block)
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 block.call == true
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.3.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, &block)
25
+ def perform_action(_msg)
25
26
  raise 'perform_action called without a block' unless block_given?
26
27
 
27
- block.call
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.3.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-01-06 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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.4.8
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: