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:
parent
0a7a03e098
commit
8796199790
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user