1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-08 21:17:43 +03:00

B #-: Fix bug accesing xpath_filter

This commit is contained in:
Ruben S. Montero 2021-04-05 13:21:40 +02:00
parent c705186762
commit 43d0796dc2
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -56,8 +56,13 @@ module VNMMAD
@nics = nics
nics_alias = VNMNetwork::Nics.new(hypervisor)
xpath_alias = xpath_filter.gsub('TEMPLATE/NIC',
'TEMPLATE/NIC_ALIAS')
if xpath_filter.nil?
xpath_alias = nil
else
xpath_alias = xpath_filter.gsub('TEMPLATE/NIC',
'TEMPLATE/NIC_ALIAS')
end
@vm_root.elements.each(xpath_alias) do |nic_element|
nic = nics_alias.new_nic