B #1600: Fixed bug with duplicated nics

(cherry picked from commit d872ece7bb)
This commit is contained in:
juanmont authored and Ruben S. Montero committed 2017-12-21 12:35:07 +01:00
1 parent 68c6ad8607
commit 0c5f9ef2a3
1 file changed
+3 -4
+3 -4
View File
@@ -850,12 +850,11 @@ module OpenNebula
rc = Error.new('The NIC_ID is missing from the VM template')
raise
end
REMOVE_VNET_ATTRS.each do |attr|
REMOVE_VNET_ATTRS.each do |attr|
nic.delete_element(attr)
end
replace << self.template_like_str(
"TEMPLATE", true, "NIC[#{nic}]") << "\n"
replace << "NIC = [ " << nic.template_like_str(".").tr("\n", ",\n") << " ] \n"
end
# Required by the Sunstone Cloud View