mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
Signed-off-by: Carlos Herrera <cherrera@opennebula.systems>
(cherry picked from commit 5b884dc626)
This commit is contained in:
1 parent
f652a5fbb8
commit
b19b08427d
1 file changed
+9
-5
@@ -892,18 +892,22 @@ module VCenterDriver
|
||||
break
|
||||
end
|
||||
|
||||
raise 'Problem with your unmanaged nics!' unless device
|
||||
|
||||
nics.delete(device)
|
||||
if device
|
||||
nics.delete(device)
|
||||
else
|
||||
nil
|
||||
end
|
||||
}
|
||||
|
||||
unmanaged_nics.each do |unic|
|
||||
vnic = select_net.call(unic['VCENTER_NET_REF'])
|
||||
nic_class = vnic.class
|
||||
nic_class = vnic.class if vnic
|
||||
new_model = Nic.nic_model_class(unic['MODEL']) if unic['MODEL']
|
||||
|
||||
if vnic.nil?
|
||||
device_change << calculate_add_nic_spec(unic)
|
||||
# delete actual nic and update the new one.
|
||||
if new_model && new_model != nic_class
|
||||
elsif new_model && new_model != nic_class
|
||||
device_change << { :device => vnic, :operation => :remove }
|
||||
device_change << calculate_add_nic_spec(unic, vnic.unitNumber)
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user