mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-13 13:17:39 +03:00
B #~: fix bug in refactor (#744)
Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
parent
2dba7c5cd9
commit
3e742b4f87
@ -1094,12 +1094,12 @@ module VCenterDriver
|
|||||||
vc_nics.each do |d|
|
vc_nics.each do |d|
|
||||||
backing = d.backing
|
backing = d.backing
|
||||||
|
|
||||||
case backing.class
|
case backing.class.to_s
|
||||||
when NET_CARD
|
when NET_CARD.to_s
|
||||||
key = backing.network._ref
|
key = backing.network._ref
|
||||||
when DNET_CARD
|
when DNET_CARD.to_s
|
||||||
key = backing.port.portgroupKey
|
key = backing.port.portgroupKey
|
||||||
when OPAQUE_CARD
|
when OPAQUE_CARD.to_s
|
||||||
# Select only Opaque Networks
|
# Select only Opaque Networks
|
||||||
opaque_networks = @item.network.select do |net|
|
opaque_networks = @item.network.select do |net|
|
||||||
RbVmomi::VIM::OpaqueNetwork == net.class
|
RbVmomi::VIM::OpaqueNetwork == net.class
|
||||||
@ -1192,7 +1192,7 @@ module VCenterDriver
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Queries for a certain nic
|
# Queries for a certain disk
|
||||||
#
|
#
|
||||||
# @param index [String | Integer] the id of the disk
|
# @param index [String | Integer] the id of the disk
|
||||||
# @param opts [hash (symbol=>boolean)]
|
# @param opts [hash (symbol=>boolean)]
|
||||||
@ -1605,6 +1605,7 @@ module VCenterDriver
|
|||||||
spl = device_str.scan(/^(nic|disk)(\d+$)/).flatten
|
spl = device_str.scan(/^(nic|disk)(\d+$)/).flatten
|
||||||
raise "#{device_str} is not supported" if spl.empty?
|
raise "#{device_str} is not supported" if spl.empty?
|
||||||
|
|
||||||
|
device = nil
|
||||||
sync = "sync_#{spl[0]}s"
|
sync = "sync_#{spl[0]}s"
|
||||||
(0..1).each do |_i|
|
(0..1).each do |_i|
|
||||||
device = send(spl[0], spl[1])
|
device = send(spl[0], spl[1])
|
||||||
|
@ -70,7 +70,7 @@ begin
|
|||||||
# VM is not new, we just need to reconfigure it and to power it on
|
# VM is not new, we just need to reconfigure it and to power it on
|
||||||
vm = VCenterDriver::VirtualMachine.new_one(vi_client, deploy_id, one_vm)
|
vm = VCenterDriver::VirtualMachine.new_one(vi_client, deploy_id, one_vm)
|
||||||
else
|
else
|
||||||
deploy[:boot] = drv_action['TEMPLATE/OS']
|
deploy[:boot] = drv_action['TEMPLATE/OS/BOOT']
|
||||||
vm = VCenterDriver::VirtualMachine.new_from_clone(vi_client,
|
vm = VCenterDriver::VirtualMachine.new_from_clone(vi_client,
|
||||||
drv_action,
|
drv_action,
|
||||||
vm_id)
|
vm_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user