mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-04 17:47:00 +03:00
Fix for wrong rollback in vCenter import_nic
This commit is contained in:
parent
f7d34f2dc7
commit
e967e965b5
@ -463,11 +463,11 @@ class Template
|
||||
end
|
||||
|
||||
rescue Exception => e
|
||||
error = "\n There was an error trying to create a virtual network for network in vcenter template. Reason: #{e.message}"
|
||||
error = "\n There was an error trying to create a virtual network to repesent a vCenter network for a VM or VM Template. Reason: #{e.message}"
|
||||
ensure
|
||||
unlock
|
||||
#Rollback, delete virtual networks
|
||||
if !error.empty?
|
||||
if !error.empty? && allocated_networks
|
||||
allocated_networks.each do |n|
|
||||
n.delete
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user