knife-vcenter 5.0.4 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/cloud/vcenter_service.rb +6 -6
- data/lib/knife-vcenter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff2523f169506ffe2b9099c744fca7d6cb17f78b1491e9d358144e1d241428c8
|
4
|
+
data.tar.gz: 2aba720664dca48806e9e2abe92def20aac39ed8b4a09cb8be8f3bbffbb20f9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3182c42e1cf563cc4141087657deaf5abac56f3065dfcc92ede22e5e3e263d29cc6583a4d82e8407bbdbdf285aec024b57c3c377ebcab0a73bb9104ae6422ea4
|
7
|
+
data.tar.gz: 72750e64d6e5de6adab941cd8865f18ddff8ae4b88e269ab2f6a27aa91b5f0bbe8e0aae1551461e8c36ff6d29bb7cbd4335ad42d90013d63f2d2e3e139be2bbb
|
@@ -22,12 +22,12 @@ require "chef/knife/cloud/service"
|
|
22
22
|
require "chef/knife/cloud/helpers"
|
23
23
|
require_relative "vcenter_service_helpers"
|
24
24
|
require_relative "../../../support/clone_vm"
|
25
|
-
require "uri"
|
26
|
-
require "json"
|
27
|
-
require "ostruct"
|
25
|
+
require "uri" unless defined?(URI)
|
26
|
+
require "json" unless defined?(JSON)
|
27
|
+
require "ostruct" unless defined?(OpenStruct)
|
28
28
|
require "vsphere-automation-cis"
|
29
29
|
require "vsphere-automation-vcenter"
|
30
|
-
require "set"
|
30
|
+
require "set" unless defined?(Set)
|
31
31
|
|
32
32
|
class Chef
|
33
33
|
# The main knife class
|
@@ -219,11 +219,11 @@ class Chef
|
|
219
219
|
rp_api = VSphereAutomation::VCenter::ResourcePoolApi.new(api_client)
|
220
220
|
|
221
221
|
if name.nil?
|
222
|
-
# Remove default pool for first pass (<= 1.2.1
|
222
|
+
# Remove default pool for first pass (<= 1.2.1 behavior to pick first user-defined pool found)
|
223
223
|
resource_pools = rp_api.list.value.delete_if { |pool| pool.name == "Resources" }
|
224
224
|
puts "Search of all resource pools found: " + resource_pools.map(&:name).to_s
|
225
225
|
|
226
|
-
# Revert to default pool, if no user-defined pool found (> 1.2.1
|
226
|
+
# Revert to default pool, if no user-defined pool found (> 1.2.1 behavior)
|
227
227
|
# (This one might not be found under some circumstances by the statement above)
|
228
228
|
return get_resource_pool("Resources") if resource_pools.empty?
|
229
229
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-vcenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.5
|
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: 2020-
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|