1
0
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:
Tino Vazquez 2017-07-12 18:26:15 +02:00
parent f7d34f2dc7
commit e967e965b5

View File

@ -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