1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #911: Fix bug when detaching a non external alias. (#2682)

This commit is contained in:
Alejandro Huertas Herrero 2018-12-05 13:11:26 +01:00 committed by Ruben S. Montero
parent 34b8ba821e
commit 581d7fe9b5

View File

@ -1012,6 +1012,7 @@ class ExecDriver < VirtualMachineDriver
# DETACHNIC action to detach a nic interface
#
def detach_nic(id, drv_message)
action = ACTION[:detach_nic]
xml_data = decode(drv_message)
nic_alias = false
@ -1035,8 +1036,6 @@ class ExecDriver < VirtualMachineDriver
return
end
action = VmmAction.new(self, id, :detach_nic, drv_message)
if !nic_alias
steps=[
# Detach the NIC
@ -1063,7 +1062,13 @@ class ExecDriver < VirtualMachineDriver
steps = []
end
action.run(steps)
if steps.empty?
send_message(action, RESULT[:success], id, "")
else
action = VmmAction.new(self, id, :detach_nic, drv_message)
action.run(steps)
end
end
#