knife-vcenter 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 75675e9853a832ee53cb558bf4271ce7ccfecb8125a2139df8a6d8c6f8f3d9da
|
|
4
|
+
data.tar.gz: 8fe144b8a77c4371a1bcc5319e7f7604968bbf7372340d598354b2855c7bc724
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 517772b42e56bc2fd01a98b0575d96310f8d23ad3755311bb08ff027ca2a0dc4b6ba0e71c814c231afff2c4d150f3980aafcd9c58c52cd52b765e08895321c8d
|
|
7
|
+
data.tar.gz: dcefbc820fc16f8e99ede9a40b98c3cfe22b44481d445c05449035ff03af640f44cd39bbddc70352eec9446d88ac00f8c47cbdb3ed8c89c40f07b6fffc7fb0f7
|
|
@@ -21,6 +21,7 @@ require "chef/knife/cloud/exceptions"
|
|
|
21
21
|
require "chef/knife/cloud/service"
|
|
22
22
|
require "chef/knife/cloud/helpers"
|
|
23
23
|
require "chef/knife/cloud/vcenter_service_helpers"
|
|
24
|
+
require "support/clone_vm"
|
|
24
25
|
require "uri"
|
|
25
26
|
require "json"
|
|
26
27
|
require "ostruct"
|
|
@@ -86,7 +87,7 @@ class Chef
|
|
|
86
87
|
|
|
87
88
|
# Some of ht eoptions need to be the ID of the component in VMware
|
|
88
89
|
# Update these using the REST API so that they can be passed to the support library
|
|
89
|
-
options[:targethost] = get_host(options[:targethost])
|
|
90
|
+
options[:targethost] = get_host(options[:targethost]).host
|
|
90
91
|
|
|
91
92
|
options[:resource_pool] = get_resource_pool(options[:resource_pool])
|
|
92
93
|
|
|
@@ -99,7 +100,7 @@ class Chef
|
|
|
99
100
|
end
|
|
100
101
|
|
|
101
102
|
# Clone the machine using the support library
|
|
102
|
-
clone_obj = Support::CloneVm.new(connection_options, options)
|
|
103
|
+
clone_obj = ::Support::CloneVm.new(connection_options, options)
|
|
103
104
|
@ipaddress = clone_obj.clone
|
|
104
105
|
|
|
105
106
|
# return an object from the restapi
|
|
@@ -112,7 +113,7 @@ class Chef
|
|
|
112
113
|
folder: get_folder(options[:folder]),
|
|
113
114
|
host: get_host(options[:targethost]).host,
|
|
114
115
|
datastore: get_datastore(options[:datastore]),
|
|
115
|
-
resource_pool:
|
|
116
|
+
resource_pool: get_resource_pool(options[:resource_pool])
|
|
116
117
|
)
|
|
117
118
|
|
|
118
119
|
# Create the CreateSpec object
|
|
@@ -125,7 +126,7 @@ class Chef
|
|
|
125
126
|
# Create the new machine
|
|
126
127
|
begin
|
|
127
128
|
create_model = VSphereAutomation::VCenter::VcenterVMCreate.new(spec: create_spec)
|
|
128
|
-
|
|
129
|
+
vm_api.create(create_model).value
|
|
129
130
|
rescue StandardError => e
|
|
130
131
|
puts e.message
|
|
131
132
|
end
|
|
@@ -213,8 +214,7 @@ class Chef
|
|
|
213
214
|
# Gets the resource_pool
|
|
214
215
|
#
|
|
215
216
|
# @param [String] name is the resource_pool of the datacenter
|
|
216
|
-
def
|
|
217
|
-
### verify
|
|
217
|
+
def get_resource_pool(name)
|
|
218
218
|
rp_api = VSphereAutomation::VCenter::ResourcePoolApi.new(api_client)
|
|
219
219
|
|
|
220
220
|
if name.nil?
|
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: 2.0.
|
|
4
|
+
version: 2.0.3
|
|
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: 2019-
|
|
11
|
+
date: 2019-03-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: knife-cloud
|