mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-19 06:50:07 +03:00
B #2827: [vCenter] added nic_default for user_template in vms
This commit is contained in:
parent
723391e918
commit
b0de097c82
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user