clc-chef-metal-vsphere 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef_metal_vsphere/version.rb +1 -1
- data/lib/chef_metal_vsphere/vsphere_helpers.rb +16 -16
- 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: fe331e4128b27e53d0c72452736f3ae651fafc44
|
4
|
+
data.tar.gz: b5fb62b6fd123c8348ced5067ee122d124a70d12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15973237344a53882facf5e6ffb12a7d78f18ba1e2873e3e5f67681ec93b53ab1b1e8a0d935dbcafa16dc7b410ba06a1958146132a4125ead2c3e6ba2120f268
|
7
|
+
data.tar.gz: fe936bf2633196eefc976c5d730e8b44d1d6380bc289bf625d56b0cec79e21e0b0c03f7d96a337515fbe0d3fd4a3122ed482d069fbd361b5086575abf61d2745
|
@@ -164,17 +164,22 @@ module ChefMetalVsphere
|
|
164
164
|
end
|
165
165
|
|
166
166
|
unless options[:network_name].to_s.nil?
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
167
|
+
config_spec_operation = RbVmomi::VIM::VirtualDeviceConfigSpecOperation('edit')
|
168
|
+
nic_backing_info = RbVmomi::VIM::VirtualEthernetCardNetworkBackingInfo(:deviceName => options[:network_name])
|
169
|
+
connectable = RbVmomi::VIM::VirtualDeviceConnectInfo(
|
170
|
+
:allowGuestControl => true,
|
171
|
+
:connected => true,
|
172
|
+
:startConnected => true)
|
173
|
+
device = RbVmomi::VIM::VirtualE1000(
|
174
|
+
:backing => nic_backing_info,
|
175
|
+
:deviceInfo => RbVmomi::VIM::Description(:label => "Network adapter 1", :summary => options[:network_name]),
|
176
|
+
:key => 4000,
|
177
|
+
:connectable => connectable)
|
178
|
+
device_spec = RbVmomi::VIM::VirtualDeviceConfigSpec(
|
179
|
+
:operation => config_spec_operation,
|
180
|
+
:device => device)
|
181
|
+
|
182
|
+
clone_spec.config.deviceChange.push device_spec
|
178
183
|
end
|
179
184
|
|
180
185
|
vm_template.CloneVM_Task(
|
@@ -211,11 +216,6 @@ module ChefMetalVsphere
|
|
211
216
|
vm
|
212
217
|
end
|
213
218
|
|
214
|
-
def find_network(dc, network_name)
|
215
|
-
baseEntity = dc.network
|
216
|
-
baseEntity.find { |f| f.name == network_name } or raise "no such network #{network_name}"
|
217
|
-
end
|
218
|
-
|
219
219
|
def find_datastore(dc, datastore_name)
|
220
220
|
baseEntity = dc.datastore
|
221
221
|
baseEntity.find { |f| f.info.name == datastore_name } or raise "no such datastore #{datastore_name}"
|
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.3
|
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-06-
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|