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

B #3990: List NSX networks only when NSX_STATUS=OK (#4016)

(cherry picked from commit b3007dcfc6d840ea28d67848c5a4e0ab05480f23)
This commit is contained in:
Angel Luis Moya Gonzalez 2019-12-03 14:06:49 +01:00 committed by Tino Vazquez
parent 333feca1c8
commit 5d118e4c2d
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

View File

@ -480,6 +480,17 @@ class DatacenterFolder
cluster_id = one_host['CLUSTER_ID']
end
# Remove networks except for onevcenter list_all command
if args[:filter]
# Remove NSX networks if NSX_STATUS != "OK"
if one_host && one_host['TEMPLATE/NSX_STATUS'] != 'OK'
networks.delete_if do |_k,v|
v[:network_type] == 'Opaque Network' || \
v[:network_type] == 'NSX-V'
end
end
end
one_cluster = VCenterDriver::ClusterComputeResource.new_from_ref(ref, @vi_client)
location = VCenterDriver::VIHelper.get_location(one_cluster.item)