diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2015-12-22 17:09:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-12-22 17:09:06 +0000 |
commit | 768b803ca6cbf20d448e360fad3b50bed6bcf76d (patch) | |
tree | fb4b4ce6a803d3a17cfec0c3be3a5c856fb6ec5d /testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | |
parent | f1a15b02f20c91a617e7475d8ca506db6db10005 (diff) | |
parent | 9627bf480703002f91464fc959903e294473aa8e (diff) |
Merge "Use repos_dir env variable in all Functest scripts"
Diffstat (limited to 'testcases/VIM/OpenStack/CI/libraries/clean_openstack.py')
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/clean_openstack.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py index d40db64c7..4c4a039a5 100644 --- a/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py +++ b/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py @@ -27,7 +27,6 @@ from keystoneclient.v2_0 import client as keystoneclient from cinderclient import client as cinderclient parser = argparse.ArgumentParser() -parser.add_argument("repo_path", help="Path to the repository") parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") args = parser.parse_args() @@ -42,13 +41,17 @@ if args.debug: else: ch.setLevel(logging.INFO) -sys.path.append(args.repo_path + "testcases/") -import functest_utils - formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) logger.addHandler(ch) +REPO_PATH=os.environ['repos_dir']+'/functest/' +if not os.path.exists(REPO_PATH): + logger.error("Functest repository directory not found '%s'" % REPO_PATH) + exit(-1) +sys.path.append(REPO_PATH + "testcases/") +import functest_utils + default_images = ['TestVM'] default_networks = ['net04', 'net04_ext', 'functest-net'] default_routers = ['router04'] |