1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

B #5277 public cloud iterates properly (#505)

This commit is contained in:
Sergio Semedi Barranco 2017-10-06 14:39:00 +02:00 committed by Tino Vázquez
parent 39e7aaf266
commit 069d995b98

View File

@ -388,14 +388,17 @@ private
# if we find the same LOCATION as @region name
# means that we have the final location
all_az_elements.each { |element|
type = element.elements["TYPE"].text.downcase
location = element.elements["LOCATION"].text.downcase rescue nil
type = element.elements["TYPE"].text
next if !type.downcase.eql? "azure"
next if type != "azure"
az = element
cloud_host = element.elements["LOCATION"]
break if cloud_host and cloud_host.text.upcase.eql? @region_name.upcase
if location.nil?
az = element
elsif location && location == @region_name.downcase
az = element
break
end
}
# If we don't find an Azure location raise an error