summaryrefslogtreecommitdiffstats
path: root/testcases/features
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-02-01 13:57:33 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-02-01 13:37:36 +0000
commitc64198994550781c8cbbb68f55501cd47178250f (patch)
tree6be1df3d78fd673853c36791e3813fd79e8cbf0f /testcases/features
parent1e051622ae8a028e27b1a70ad33796fd375a6e6f (diff)
Export private net OS_TEST_NETWORK for Promise tests
Change-Id: Ie2e83a049a98f8e63245c3b992ff379fd353a0be Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit cc8dd9e8092cc68484d8ad3422c97762658271e8)
Diffstat (limited to 'testcases/features')
-rw-r--r--testcases/features/promise.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/testcases/features/promise.py b/testcases/features/promise.py
index 0dc755b57..22d28fb99 100644
--- a/testcases/features/promise.py
+++ b/testcases/features/promise.py
@@ -20,6 +20,7 @@ import yaml
import keystoneclient.v2_0.client as ksclient
import glanceclient.client as glclient
import novaclient.client as nvclient
+from neutronclient.v2_0 import client as ntclient
parser = argparse.ArgumentParser()
@@ -172,6 +173,13 @@ def main():
exit(-1)
logger.debug("Flavor '%s' with ID '%s' created successfully." % (FLAVOR_NAME,
flavor_id))
+ neutron = ntclient.Client(**nt_creds)
+ private_net=functest_utils.get_private_net(neutron)
+ if private_net == None:
+ logger.error("There is no private network in the deployment. Aborting...")
+ exit(-1)
+ logger.debug("Using private network '%s' (%s)." % (private_net['name'],
+ private_net['id']))
logger.info("Exporting environment variables...")
os.environ["NODE_ENV"] = "functest"
@@ -180,6 +188,8 @@ def main():
os.environ["OS_PASSWORD"] = USER_PWD
os.environ["OS_TEST_IMAGE"] = image_id
os.environ["OS_TEST_FLAVOR"] = flavor_id
+ os.environ["OS_TEST_NETWORK"] = private_net['id']
+
os.chdir(PROMISE_REPO)
results_file=open('promise-results.json','w+')