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

B #3839: Fix remove DPG uplinks (#3889)

Remove Distributed Port Groups uplinks from network detection
Remove networks without any host asociated.
This commit is contained in:
Angel Luis Moya Gonzalez 2019-10-30 18:34:51 +01:00 committed by Tino Vázquez
parent f12bf9001f
commit 147b4fd237

View File

@ -373,6 +373,13 @@ class DatacenterFolder
next if exist
# Exclude networks without hosts
next if r.obj['host'].empty?
# Exclude uplinks
unless r.obj['tag'].empty?
next if r.obj['tag'][0][:key] == 'SYSTEM/DVS.UPLINKPG'
end
networks[r.obj._ref] = r.to_hash if r.obj.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) || r.obj.is_a?(RbVmomi::VIM::Network) || r.obj.is_a?(RbVmomi::VIM::OpaqueNetwork)
if r.obj.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup)