clc-chef-metal-vsphere 0.3.20 → 0.3.21

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
  SHA1:
3
- metadata.gz: 4c3973ec40c03e9e71b584570340a4e430f0b8b4
4
- data.tar.gz: 12a687f5c9dfa2077b7cf4bb03be9216c0e7bac6
3
+ metadata.gz: d16dbc6a25eb57abb89031a4454b2973333cb83e
4
+ data.tar.gz: 00eeaafca401e0718c7b37701652d3ed55159967
5
5
  SHA512:
6
- metadata.gz: 24a97ca603387b32230d046440fe098b53d921a99e825a7779a2d648d69244f510013c5ba4a0fa642e3c7011b89b4d2bfeb12bcfc5740d573d6ee771ba328357
7
- data.tar.gz: a8cdc223b72bb45763acb5a593b9c01f31156d38e3f502252a4b85ba40cf468a07bf1e0eb329b65518eb2d5d4e46904a201d92a0e27c76ebacae18e694020b47
6
+ metadata.gz: 2a2b0e545aca1dc66b78b5d63fc0e8a5244a973f42bcd359cc7a016df2b210f08833767b1ea8800fbde7342f4b77bc03e783d7cbe5abceac94e8520ec91374a9
7
+ data.tar.gz: d5d2f123bfd12d4b9c5eeab7473a9add9bf2d41515e2c8eae5668ca0a3aa729803a44a15c3ed5a1909b9c7d75f82127eaf3c25b1cd00801811627dab18035ebe
@@ -1,3 +1,3 @@
1
1
  module ChefMetalVsphere
2
- VERSION = '0.3.20'
2
+ VERSION = '0.3.21'
3
3
  end
@@ -205,16 +205,16 @@ module ChefMetalVsphere
205
205
  end
206
206
 
207
207
  if transport.nil? || !transport.available?
208
- Chef::Log.info "waiting for customizations to complete"
208
+ action_handler.report_progress "waiting for customizations to complete"
209
209
  now = Time.now.utc
210
210
  until (Time.now.utc - now) > 45 || (!vm.guest.ipAddress.nil? && vm.guest.ipAddress.length > 0) do
211
211
  print "-"
212
212
  sleep 5
213
213
  end
214
214
  if vm.guest.ipAddress.nil? || vm.guest.ipAddress.length == 0
215
- Chef::Log.info "rebooting..."
215
+ action_handler.report_progress "rebooting..."
216
216
  if vm.guest.toolsRunningStatus != "guestToolsRunning"
217
- Chef::Log.info "tools have stopped. current power state is #{vm.runtime.powerState} and tools state is #{vm.toolsRunningStatus}. powering up server..."
217
+ action_handler.report_progress "tools have stopped. current power state is #{vm.runtime.powerState} and tools state is #{vm.toolsRunningStatus}. powering up server..."
218
218
  start_vm(vm)
219
219
  else
220
220
  restart_server(action_handler, machine_spec, vm)
@@ -225,6 +225,7 @@ module ChefMetalVsphere
225
225
  sleep 5
226
226
  end
227
227
  end
228
+ action_handler.report_progress "IP address obtained: #{vm.guest.ipAddress}"
228
229
  end
229
230
 
230
231
  begin
@@ -434,13 +435,8 @@ module ChefMetalVsphere
434
435
  end
435
436
 
436
437
  def wait_for_transport(action_handler, machine_spec, machine_options, vm)
437
- begin
438
- transport = transport_for(machine_spec, machine_options, vm)
439
- rescue Exception => e
440
- Chef::Log.warn "Unable to obtain transport: #{e}"
441
- end
442
-
443
- if transport.nil? || !transport.available?
438
+ transport = transport_for(machine_spec, machine_options, vm)
439
+ if !transport.available?
444
440
  if action_handler.should_perform_actions
445
441
  action_handler.report_progress "waiting for #{machine_spec.name} (#{vm.config.instanceUuid} on #{driver_url}) to be connectable (transport up and running) ..."
446
442
 
@@ -469,7 +465,6 @@ module ChefMetalVsphere
469
465
  bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
470
466
  ssh_options = bootstrap_options[:ssh]
471
467
  remote_host = ip_for(bootstrap_options, vm)
472
- return if remote_host.nil?
473
468
  winrm_options = {:user => "#{remote_host}\\#{ssh_options[:user]}", :pass => ssh_options[:password], :disable_sspi => true}
474
469
 
475
470
  ChefMetal::Transport::WinRM.new("http://#{remote_host}:5985/wsman", :plaintext, winrm_options, config)
@@ -481,7 +476,6 @@ module ChefMetalVsphere
481
476
  ssh_options = bootstrap_options[:ssh]
482
477
  ssh_user = ssh_options[:user]
483
478
  remote_host = ip_for(bootstrap_options, vm)
484
- return if remote_host.nil?
485
479
 
486
480
  ChefMetal::Transport::SSH.new(remote_host, ssh_user, ssh_options, {}, config)
487
481
  end
@@ -489,8 +483,8 @@ module ChefMetalVsphere
489
483
  def ip_for(bootstrap_options, vm)
490
484
  if has_static_ip(bootstrap_options)
491
485
  bootstrap_options[:customization_spec][:ipsettings][:ip]
492
- else vm.guest.respond_to?('ipaddress')
493
- vm.guest.ipaddress
486
+ else
487
+ vm.guest.ipAddress
494
488
  end
495
489
  end
496
490
  end
@@ -27,7 +27,6 @@
27
27
  :convergence_options => {},
28
28
  :customization_spec => {
29
29
  :ipsettings => {
30
- :ip => "172.21.20.196",
31
30
  :subnetMask => '255.255.255.0',
32
31
  :gateway => ["172.21.20.1"],
33
32
  :dnsServerList => ["172.17.1.26","172.17.1.27"]
@@ -39,6 +39,7 @@ describe "vsphere_driver" do
39
39
 
40
40
  before :all do
41
41
  @vm_name = "cmvd-test-#{SecureRandom.hex}"
42
+ #@vm_name = "cmvd-test-ee744c7bd5588f743c175dfc4100f172"
42
43
  @metal_config = eval File.read(File.expand_path('../config.rb', __FILE__))
43
44
  Cheffish.honor_local_mode do
44
45
  chef_server = Cheffish.default_chef_server(@metal_config)
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.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud