1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

B #4274: Fix VM templates in Sunstone (#4333)

B #4278: Fix VM templates in Sunstone
This commit is contained in:
Sergio Betanzos 2020-03-10 19:24:59 +01:00 committed by GitHub
parent 958ed9f973
commit 04023a0ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,6 +219,7 @@ define(function(require) {
delete templateJSON["NIC_PCI"];
}
return templateJSON;
}
@ -256,11 +257,10 @@ define(function(require) {
current = currentTemplate[0].VMTEMPLATE.TEMPLATE;
}
if(current) {
if (current.NIC && !templateJSON.NIC) {
delete current.NIC;
}
if(current.NIC_ALIAS && !templateJSON.NIC_ALIAS) {
delete current.NIC_ALIAS;
for (key in current) {
if (!templateJSON[key]) {
delete current[key]
}
}
}
}