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

F OpenNebula/one#6280: Add backend detection for VRouter's LBs (#2860)

This commit is contained in:
Michal Opala 2024-01-02 14:29:16 +01:00 committed by GitHub
parent 0a7a03e098
commit 8796199790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -855,6 +855,18 @@ def build_vnet_hash(vnet, client, extended)
# Get extended info
lease['NIC_NAME'] = nic['NAME']
xpath = "./TEMPLATE/CONTEXT/BACKEND"
backend = vm.retrieve_xmlelements(xpath)[0]
if !backend.nil? && backend.text.downcase == 'yes'
lease['BACKEND'] = 'YES'
xpath = "./USER_TEMPLATE/*[starts-with(local-name(), 'ONEGATE_')]"
vm.retrieve_xmlelements(xpath).each do |item|
lease[item.name] = item.text
end
end
end
end