summaryrefslogtreecommitdiffstats
path: root/testcases/vIMS/CI
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/vIMS/CI')
-rw-r--r--testcases/vIMS/CI/vIMS.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py
index d2d10f345..07241c14e 100644
--- a/testcases/vIMS/CI/vIMS.py
+++ b/testcases/vIMS/CI/vIMS.py
@@ -45,7 +45,6 @@ ch.setFormatter(formatter)
logger.addHandler(ch)
-HOME = os.environ['HOME']+"/"
# with open(args.repo_path+"config_functest.yaml") as f:
with open(args.repo_path + "testcases/config_functest.yaml") as f:
functest_yaml = yaml.safe_load(f)
@@ -53,9 +52,8 @@ f.close()
# Cloudify parameters
REPO_PATH = args.repo_path
-HOME = os.environ['HOME']+"/"
VIMS_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_vIMS")
-VIMS_DATA_DIR = HOME + functest_yaml.get("general").get("directories").get("dir_vIMS_data")
+VIMS_DATA_DIR = functest_yaml.get("general").get("directories").get("dir_vIMS_data")+"/"
TENANT_NAME = functest_yaml.get("vIMS").get("general").get("tenant_name")
TENANT_DESCRIPTION = functest_yaml.get("vIMS").get("general").get("tenant_description")
@@ -79,6 +77,8 @@ def pMsg(value):
def download_and_add_image_on_glance(glance, image_name, image_url):
dest_path = VIMS_DATA_DIR + "tmp/"
+ if not os.path.exists(dest_path):
+ os.makedirs(dest_path)
file_name = image_url.rsplit('/')[-1]
if not functest_utils.download_url(image_url, dest_path):
logger.error("Failed to download image %s" %file_name)