clc-chef-metal-vsphere 0.3.33 → 0.3.34

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: c386928597c16e1c09da241aaf74e2df8957da24
4
- data.tar.gz: 9b0051985272d8b4852ce3f3b9b2ea62350621d2
3
+ metadata.gz: b75f04e739aacacdf87a879121fb781da3d7490d
4
+ data.tar.gz: 546c36a81fb1f1b9184db92c0a240ea7d7027a81
5
5
  SHA512:
6
- metadata.gz: 1458e0af757009ed5e225294612f15457cdd8377b3319cd71738e175b64aacda93f3874e7868ff7aaba7513d81fd7f94187a21357546f8bf7092524655e68f56
7
- data.tar.gz: 1f31bfe97a2fc544db9efad7934fb13d6960a363f98e8161588c3ecede4a0d1e933f1b4e47ae587aec6d3f5df6deec99580918c78223fb89522cb2ea5a940f57
6
+ metadata.gz: 5f198c590723cfd2a735d8754a51542fa94506e25adc1bcbcbdad85a2acd95e53b600fd1622d5693391602b60cd6cbd454c71670f599a44c33bff5cea8c93dab
7
+ data.tar.gz: 8e0f36370103e28d8b83203eb8deb31883e5e0ef3980dcf4f0997b80b75aacfd44fd18d7504db15a059149ce46646d4a989bf6d5308c9def7f3cffb179d07770
@@ -1,3 +1,3 @@
1
1
  module ChefMetalVsphere
2
- VERSION = '0.3.33'
2
+ VERSION = '0.3.34'
3
3
  end
@@ -236,13 +236,15 @@ module ChefMetalVsphere
236
236
  now = Time.now.utc
237
237
  trimmed_name = machine_spec.name.byteslice(0,15)
238
238
  expected_name="#{trimmed_name}.#{domain}"
239
- action_handler.report_progress "waiting to domain join and be named expected_name"
239
+ action_handler.report_progress "waiting to domain join and be named #{expected_name}"
240
240
  until (Time.now.utc - now) > 30 || (vm.guest.hostName == expected_name) do
241
241
  print "."
242
242
  sleep 5
243
243
  end
244
244
  end
245
245
 
246
+ add_extra_nic(action_handler, vm_template_for(bootstrap_options), bootstrap_options, vm)
247
+
246
248
  begin
247
249
  wait_for_transport(action_handler, machine_spec, machine_options, vm)
248
250
  rescue Timeout::Error
@@ -263,8 +265,6 @@ module ChefMetalVsphere
263
265
  setup_ubuntu_dns(machine, bootstrap_options, machine_spec)
264
266
  end
265
267
 
266
- add_extra_nic(action_handler, vm_template_for(bootstrap_options), bootstrap_options, vm)
267
-
268
268
  machine
269
269
  end
270
270
 
@@ -462,8 +462,6 @@ module ChefMetalVsphere
462
462
  if action_handler.should_perform_actions
463
463
  action_handler.report_progress "waiting for #{machine_spec.name} (#{vm.config.instanceUuid} on #{driver_url}) to be connectable (transport up and running) ..."
464
464
 
465
- _self = self
466
-
467
465
  until remaining_wait_time(machine_spec, machine_options) < 0 || transport.available? do
468
466
  print "."
469
467
  sleep 5
@@ -158,9 +158,16 @@ module ChefMetalVsphere
158
158
 
159
159
  def add_extra_nic(action_handler, vm_template, options, vm)
160
160
  deviceAdditions, changes = network_device_changes(action_handler, vm_template, options)
161
+
161
162
  if deviceAdditions.count > 0
162
- task = vm.ReconfigVM_Task(:spec => RbVmomi::VIM.VirtualMachineConfigSpec(:deviceChange => deviceAdditions))
163
- task.wait_for_completion
163
+ current_networks = find_ethernet_cards_for(vm).map{|card| card.backing.deviceName}
164
+ new_devices = deviceAdditions.select { |device| !current_networks.include?(device.device.backing.deviceName)}
165
+
166
+ if new_devices.count > 0
167
+ action_handler.report_progress "Adding extra NICs"
168
+ task = vm.ReconfigVM_Task(:spec => RbVmomi::VIM.VirtualMachineConfigSpec(:deviceChange => new_devices))
169
+ task.wait_for_completion
170
+ end
164
171
  end
165
172
  end
166
173
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clc-chef-metal-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.33
4
+ version: 0.3.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud