1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request from stonith/master

[vsphere|compute] Add nic_type option for clone operation.
This commit is contained in:
Kevin Menard 2015-02-02 17:18:24 -05:00
commit 529bae7a4f

View file

@ -7,6 +7,7 @@ module Fog
default_options = {
'force' => false,
'linked_clone' => false,
'nic_type' => 'VirtualE1000',
}
options = default_options.merge(options)
# Backwards compat for "path" option
@ -124,11 +125,11 @@ module Fog
:allowGuestControl => true,
:connected => true,
:startConnected => true)
device = RbVmomi::VIM::VirtualE1000(
device = RbVmomi::VIM.public_send "#{options['nic_type']}",
:backing => nic_backing_info,
:deviceInfo => RbVmomi::VIM::Description(:label => "Network adapter 1", :summary => options['network_label']),
:key => options['network_adapter_device_key'],
:connectable => connectable)
:connectable => connectable
device_spec = RbVmomi::VIM::VirtualDeviceConfigSpec(
:operation => config_spec_operation,
:device => device)