knife-vsphere 1.2.13 → 1.2.14

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: 92495960a0105c5c704b19d8a0a74c0c88632391
4
- data.tar.gz: bb30bd0c5d075f7b122231366c14d0d51da72bd1
3
+ metadata.gz: 5568fb262d8a952f210fb7a7100f54bbc4c0c989
4
+ data.tar.gz: 2d103c82c324bf3f9577adc8a92583771ce5ccd1
5
5
  SHA512:
6
- metadata.gz: a0bd94602e0ab3537796afe7b46bd7502e63b3b2e34d299136e95d11d79958e781afc8822bb03766915bef61d1016637d366f041edb269db0035f6dbc492d797
7
- data.tar.gz: 964a90190d4d099458b929b5d69a00e82187d76b216a157a7393bea31ecc8f9d3d932fc58f2615eb060d05f0a7b93712bbbc67f9eba809e27347257199dc7701
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')
@@ -1,3 +1,3 @@
1
1
  module KnifeVsphere
2
- VERSION = '1.2.13'
2
+ VERSION = '1.2.14'
3
3
  end
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.13
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-18 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: filesize