mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
Revert "B #2474 fix retrieve info from template"
This reverts commit 0d5f51906cc208baf38a2a7a7066fa643fcb8735.
This commit is contained in:
parent
7d798e54b3
commit
7eee49b352
@ -1901,16 +1901,13 @@ class VirtualMachine < Template
|
||||
mode = ""
|
||||
if !one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL').nil? &&
|
||||
!one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL').empty?
|
||||
model = one_item['TEMPLATE/NIC_DEFAULT/MODEL']
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla del nic default: #{model}\n") }
|
||||
model = one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL')
|
||||
elsif (model.nil? || model.empty?) &&
|
||||
!nic['MODEL'].nil? &&
|
||||
!nic['MODEL'].empty?
|
||||
model = nic['MODEL']
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla del nic: #{model}\n") }
|
||||
else
|
||||
model = VCenterDriver::VIHelper.get_default('VM/TEMPLATE/NIC/MODEL')
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla vcenter default #{model}\n") }
|
||||
end
|
||||
vnet_ref = nic["VCENTER_NET_REF"]
|
||||
backing = nil
|
||||
@ -2011,16 +2008,13 @@ class VirtualMachine < Template
|
||||
model = ""
|
||||
if !one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL').nil? &&
|
||||
!one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL').empty?
|
||||
model = one_item['TEMPLATE/NIC_DEFAULT/MODEL']
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla del nic default: #{model}\n") }
|
||||
model = one_item.retrieve_xmlelements('TEMPLATE/NIC_DEFAULT/MODEL')
|
||||
elsif (model.nil? || model.empty?) &&
|
||||
!nic['MODEL'].nil? &&
|
||||
!nic['MODEL'].empty?
|
||||
model = nic['MODEL']
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla del nic: #{model}\n") }
|
||||
else
|
||||
model = VCenterDriver::VIHelper.get_default('VM/TEMPLATE/NIC/MODEL')
|
||||
File.open("/tmp/culo", 'w') {|f| f.write("Lo pilla del vcenter default: #{model}\n") }
|
||||
end
|
||||
vnet_ref = nic["VCENTER_NET_REF"]
|
||||
backing = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user