1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-03 13:47:01 +03:00

Fix B#4928 import vcenter networks with same name in different clusters

This commit is contained in:
mcabrerizo 2016-11-18 18:03:24 +01:00
parent 4d95cb449a
commit 10b7bd74e2

View File

@ -517,9 +517,10 @@ class VIClient
next if !n[:host][0]
# Networks can be in several cluster, create one per cluster
net_names = []
Array(n[:host]).each{ |host_system|
net_name = "#{n.name} - #{host_system.parent.name}"
if !net_names.include?(net_name)
if !vnpool["VNET[BRIDGE=\"#{n[:name]}\"]/\
TEMPLATE[VCENTER_TYPE=\"Port Group\"]"]
one_nets << {
@ -532,6 +533,8 @@ class VIClient
"VN_MAD = \"dummy\"\n" \
"VCENTER_TYPE = \"Port Group\""
}
net_names << net_name
end
end
}
}