mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
B #2827: [vCenter] added nic_default for user_template in vms
This commit is contained in:
1 parent
723391e918
commit
b0de097c82
1 file changed
+4
-2
@@ -1510,8 +1510,9 @@ class VirtualMachine < VCenterDriver::Template
|
||||
mac = nic["MAC"]
|
||||
pg_name = nic["BRIDGE"]
|
||||
default = VCenterDriver::VIHelper.get_default('VM/TEMPLATE/NIC/MODEL')
|
||||
tmodel = one_item['USER_TEMPLATE/NIC_DEFAULT/MODEL']
|
||||
|
||||
model = nic['MODEL'] || default
|
||||
model = nic['MODEL'] || tmodel || default
|
||||
raise 'nic model cannot be empty!' if model == ''
|
||||
|
||||
vnet_ref = nic["VCENTER_NET_REF"]
|
||||
@@ -1606,8 +1607,9 @@ class VirtualMachine < VCenterDriver::Template
|
||||
pg_name = nic["BRIDGE"]
|
||||
model = ''
|
||||
default = VCenterDriver::VIHelper.get_default('VM/TEMPLATE/NIC/MODEL')
|
||||
tmodel = one_item['USER_TEMPLATE/NIC_DEFAULT/MODEL']
|
||||
|
||||
model = nic['MODEL'] || default
|
||||
model = nic['MODEL'] || tmodel || default
|
||||
|
||||
vnet_ref = nic["VCENTER_NET_REF"]
|
||||
backing = nil
|
||||
|
||||
Reference in new issue
Block a user