1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-27 03:21:29 +03:00

B #~: fix bug in refactor (#744)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera 2021-02-03 06:33:21 -05:00 committed by GitHub
parent 2dba7c5cd9
commit 3e742b4f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -1094,12 +1094,12 @@ module VCenterDriver
vc_nics.each do |d|
backing = d.backing
case backing.class
when NET_CARD
case backing.class.to_s
when NET_CARD.to_s
key = backing.network._ref
when DNET_CARD
when DNET_CARD.to_s
key = backing.port.portgroupKey
when OPAQUE_CARD
when OPAQUE_CARD.to_s
# Select only Opaque Networks
opaque_networks = @item.network.select do |net|
RbVmomi::VIM::OpaqueNetwork == net.class
@ -1192,7 +1192,7 @@ module VCenterDriver
end
end
# Queries for a certain nic
# Queries for a certain disk
#
# @param index [String | Integer] the id of the disk
# @param opts [hash (symbol=>boolean)]
@ -1605,6 +1605,7 @@ module VCenterDriver
spl = device_str.scan(/^(nic|disk)(\d+$)/).flatten
raise "#{device_str} is not supported" if spl.empty?
device = nil
sync = "sync_#{spl[0]}s"
(0..1).each do |_i|
device = send(spl[0], spl[1])

View File

@ -70,7 +70,7 @@ begin
# 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)
else
deploy[:boot] = drv_action['TEMPLATE/OS']
deploy[:boot] = drv_action['TEMPLATE/OS/BOOT']
vm = VCenterDriver::VirtualMachine.new_from_clone(vi_client,
drv_action,
vm_id)