summaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r--testcases/functest_utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py
index d09ae8312..7dce96da1 100644
--- a/testcases/functest_utils.py
+++ b/testcases/functest_utils.py
@@ -250,6 +250,17 @@ def update_sg_quota(neutron_client, tenant_id, sg_quota, sg_rule_quota):
print "Error:", sys.exc_info()[0]
return False
+
+def get_private_net(neutron_client):
+ # Checks if there is an existing private network
+ networks = neutron_client.list_networks()['networks']
+ if len(networks) == 0:
+ return None
+ for net in networks:
+ if net['router:external'] == False:
+ return net
+ return None
+
# ################ GLANCE #################