summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vmware_nsx/db/nsxv_db.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/vmware_nsx/db/nsxv_db.py b/vmware_nsx/db/nsxv_db.py
index 88be7ff..a414eef 100644
--- a/vmware_nsx/db/nsxv_db.py
+++ b/vmware_nsx/db/nsxv_db.py
@@ -386,6 +386,14 @@ def get_nsxv_internal_network(session, network_purpose, availability_zone):
386 if net_list: 386 if net_list:
387 # Should have only one results as purpose+az are the keys 387 # Should have only one results as purpose+az are the keys
388 return net_list[0] 388 return net_list[0]
389 else:
390 # try the default availability zone, since this zone does not
391 # have his own
392 net_list = (session.query(nsxv_models.NsxvInternalNetworks).
393 filter_by(network_purpose=network_purpose,
394 availability_zone='default').all())
395 if net_list:
396 return net_list[0]
389 397
390 398
391def get_nsxv_internal_networks(session, network_purpose): 399def get_nsxv_internal_networks(session, network_purpose):