From 7fbd9f67fa43997bc8b030ab24dcc4315493c1b1 Mon Sep 17 00:00:00 2001 From: Michal Jagiello Date: Mon, 5 Jul 2021 10:45:05 +0000 Subject: [TEST] Basic macro stability scenario Issue-ID: TEST-349 Signed-off-by: Michal Jagiello Change-Id: I951e9720668de9bf00136d4e043c9fe8950061f1 --- src/onaptests/steps/onboard/vf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/onaptests/steps/onboard/vf.py') diff --git a/src/onaptests/steps/onboard/vf.py b/src/onaptests/steps/onboard/vf.py index 7e4882e..76aaf2e 100644 --- a/src/onaptests/steps/onboard/vf.py +++ b/src/onaptests/steps/onboard/vf.py @@ -1,3 +1,5 @@ +from pathlib import Path +import sys import time from onapsdk.configuration import settings @@ -94,11 +96,14 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep): "vnf_artifact_label", "vnf_artifact_file_path"]]): vf.create() + artifact_file_path: Path = Path(vnf["vnf_artifact_file_path"]) + if not artifact_file_path.exists(): + artifact_file_path = Path(sys.path[-1], artifact_file_path) vf.add_deployment_artifact( artifact_type=vnf["vnf_artifact_type"], artifact_name=vnf["vnf_artifact_name"], artifact_label=vnf["vnf_artifact_label"], - artifact=vnf["vnf_artifact_file_path"] + artifact=str(artifact_file_path) ) time.sleep(10) vf.onboard() -- cgit 1.2.3-korg