knife-vsphere 1.2.13 → 1.2.14
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 +4 -4
- data/lib/chef/knife/vsphere_vm_clone.rb +12 -9
- data/lib/knife-vsphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5568fb262d8a952f210fb7a7100f54bbc4c0c989
|
|
4
|
+
data.tar.gz: 2d103c82c324bf3f9577adc8a92583771ce5ccd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96ccd1409e9573d2c26038163c32bfecb2d3d365d1b2af493ca1d0eb475fcd5f7a2a60a48a656f2d1dd26775da9f692fed192abdfe5281c9c159523cc3ff63a4
|
|
7
|
+
data.tar.gz: 9106e7eb45638e26928413b0fc2a6406bb79ab2023515edda7e5c8415e0e686ad137ba5fc54d834df694bb70033707e8bcd37489e7b40920d420ec6d900d72f4
|
|
@@ -90,7 +90,8 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
|
|
|
90
90
|
|
|
91
91
|
option :customization_macs,
|
|
92
92
|
long: '--cmacs CUST_MACS',
|
|
93
|
-
description: 'Comma-delimited list of MAC addresses for network adapters'
|
|
93
|
+
description: 'Comma-delimited list of MAC addresses for network adapters',
|
|
94
|
+
default: 'auto'
|
|
94
95
|
|
|
95
96
|
option :customization_ips,
|
|
96
97
|
long: '--cips CUST_IPS',
|
|
@@ -335,6 +336,9 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
|
|
|
335
336
|
|
|
336
337
|
task = src_vm.CloneVM_Task(folder: dest_folder, name: vmname, spec: clone_spec)
|
|
337
338
|
puts "Cloning template #{config[:source_vm]} to new VM #{vmname}"
|
|
339
|
+
|
|
340
|
+
pp clone_spec if log_verbose?
|
|
341
|
+
|
|
338
342
|
task.wait_for_completion
|
|
339
343
|
puts "Finished creating virtual machine #{vmname}"
|
|
340
344
|
|
|
@@ -533,17 +537,16 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
|
|
|
533
537
|
clone_spec.config.memoryMB = Integer(get_config(:customization_memory)) * 1024
|
|
534
538
|
end
|
|
535
539
|
|
|
536
|
-
if get_config(:customization_macs)
|
|
537
|
-
unless get_config(:customization_ips)
|
|
540
|
+
if get_config(:customization_macs) && !get_config(:customization_ips)
|
|
538
541
|
abort('Must specify IP numbers with --cips when specifying MAC addresses with --cmacs, can use "dhcp" as placeholder')
|
|
539
|
-
end
|
|
540
|
-
mac_list = if get_config(:customization_macs) == 'auto'
|
|
541
|
-
['auto'] * get_config(:customization_ips).split(',').length
|
|
542
|
-
else
|
|
543
|
-
get_config(:customization_macs).split(',')
|
|
544
|
-
end
|
|
545
542
|
end
|
|
546
543
|
|
|
544
|
+
mac_list = if get_config(:customization_macs) == 'auto'
|
|
545
|
+
['auto'] * get_config(:customization_ips).split(',').length
|
|
546
|
+
else
|
|
547
|
+
get_config(:customization_macs).split(',')
|
|
548
|
+
end
|
|
549
|
+
|
|
547
550
|
if get_config(:customization_sw_uuid)
|
|
548
551
|
unless get_config(:customization_vlan)
|
|
549
552
|
abort('Must specify VLANs with --cvlan when specifying switch UUIDs with --sw-uuids')
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-vsphere
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ezra Pagel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-08-
|
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: filesize
|