clc-chef-metal-vsphere 0.3.16 → 0.3.17
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b0c4dd9dae64818686e099b41f1cb311f6c881f
|
4
|
+
data.tar.gz: 7be6d68e6ef5a3621130d58b6226ecd3accd60d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ede6ed4068081c171c9a1449434db54c3dfa07253e4c0fe76e1b2e280cdb79ef097be028ca10d090c2f01682fa42e297934d1c8c8cae51abb7e1a507e43aa9
|
7
|
+
data.tar.gz: be3b6fb95e507a4f433d5a94c5c4fca0cd83eeb2c22dba97b8cb0d68762394e04f965051c74315319982414760b02a53f0e8fec3d2059b2f96f97fab02ac3bd4
|
@@ -434,7 +434,7 @@ module ChefMetalVsphere
|
|
434
434
|
|
435
435
|
def wait_for_transport(action_handler, machine_spec, machine_options, vm)
|
436
436
|
transport = transport_for(machine_spec, machine_options, vm)
|
437
|
-
if !transport.available?
|
437
|
+
if transport.nil? || !transport.available?
|
438
438
|
if action_handler.should_perform_actions
|
439
439
|
action_handler.report_progress "waiting for #{machine_spec.name} (#{vm.config.instanceUuid} on #{driver_url}) to be connectable (transport up and running) ..."
|
440
440
|
|
@@ -462,7 +462,8 @@ module ChefMetalVsphere
|
|
462
462
|
require 'chef_metal/transport/winrm'
|
463
463
|
bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
|
464
464
|
ssh_options = bootstrap_options[:ssh]
|
465
|
-
remote_host =
|
465
|
+
remote_host = ip_for(bootstrap_options, vm)
|
466
|
+
return if remote_host.nil?
|
466
467
|
winrm_options = {:user => "#{remote_host}\\#{ssh_options[:user]}", :pass => ssh_options[:password], :disable_sspi => true}
|
467
468
|
|
468
469
|
ChefMetal::Transport::WinRM.new("http://#{remote_host}:5985/wsman", :plaintext, winrm_options, config)
|
@@ -473,12 +474,18 @@ module ChefMetalVsphere
|
|
473
474
|
bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
|
474
475
|
ssh_options = bootstrap_options[:ssh]
|
475
476
|
ssh_user = ssh_options[:user]
|
476
|
-
remote_host =
|
477
|
+
remote_host = ip_for(bootstrap_options, vm)
|
478
|
+
return if remote_host.nil?
|
477
479
|
|
478
480
|
ChefMetal::Transport::SSH.new(remote_host, ssh_user, ssh_options, {}, config)
|
479
481
|
end
|
482
|
+
|
483
|
+
def ip_for(bootstrap_options, vm)
|
484
|
+
if has_static_ip(bootstrap_options)
|
485
|
+
bootstrap_options[:customization_spec][:ipsettings][:ip]
|
486
|
+
elsif vm.guest.respond_to?('ipaddress')
|
487
|
+
vm.guest.ipaddress
|
488
|
+
end
|
489
|
+
end
|
480
490
|
end
|
481
491
|
end
|
482
|
-
|
483
|
-
|
484
|
-
# wr=WinRM::WinRMWebService.new('http://172.21.20.196:5985/wsman', :plaintext, {:user => "cmvd-test-41f91\\Administrator", :pass => 'Password123', :basic_auth_only => true})
|
@@ -118,7 +118,7 @@ module ChefMetalVsphere
|
|
118
118
|
if(options[:customization_spec].is_a?(Hash))
|
119
119
|
cust_options = options[:customization_spec]
|
120
120
|
raise ArgumentError, "domain is required" unless cust_options.key?(:domain)
|
121
|
-
if cust_options.key?(:ipsettings)
|
121
|
+
if cust_options.key?(:ipsettings) and cust_options[:ipsettings].key?(:ip)
|
122
122
|
raise ArgumentError, "ip and subnetMask is required for static ip" unless cust_options[:ipsettings].key?(:ip) and
|
123
123
|
cust_options[:ipsettings].key?(:subnetMask)
|
124
124
|
cust_ip_settings = RbVmomi::VIM::CustomizationIPSettings.new(cust_options[:ipsettings])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clc-chef-metal-vsphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|