Add clean_openstack script call in clean functest environment 07/4707/2
authorjose.lausuch <jose.lausuch@ericsson.com>
Wed, 16 Dec 2015 22:44:58 +0000 (23:44 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Wed, 16 Dec 2015 23:28:34 +0000 (00:28 +0100)
Reason: sometimes, if you run functest, it creates openstack stuff
and fails, when you run it the second time it can fail if
it tries to create the same openstack stuff

Change-Id: I1825a02918f188c409398d2b6b95843d7fdd5993
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
testcases/config_functest.py

index 11b31c9..1d834bb 100755 (executable)
@@ -47,8 +47,6 @@ with open(args.repo_path+"testcases/config_functest.yaml") as f:
 f.close()
 
 
-
-
 """ global variables """
 # Directories
 REPO_PATH = args.repo_path
@@ -195,7 +193,11 @@ def action_clean():
         logger.debug("Removing Result directory")
         shutil.rmtree(RALLY_RESULT_DIR,ignore_errors=True)
 
-
+    logger.debug("Cleaning up the OpenStack deployment...")
+    cmd='python ' + args.repo_path + \
+        '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py -d ' \
+        +args.repo_path
+    functest_utils.execute_command(cmd,logger)
     logger.info("Functest environment clean!")