From 0a315a1b542a96d62fea12f49b353bca54464ee7 Mon Sep 17 00:00:00 2001 From: Michal Jagiello Date: Tue, 23 Mar 2021 18:23:48 +0000 Subject: Basic VM macro Issue-ID: INT-1894 Signed-off-by: Michal Jagiello Change-Id: Idd977cf3082587746fe27718a284197fda4afe5c --- src/onaptests/steps/onboard/vf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (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 817b412..5f5fc4d 100644 --- a/src/onaptests/steps/onboard/vf.py +++ b/src/onaptests/steps/onboard/vf.py @@ -85,4 +85,15 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep): for vnf in self.yaml_template["vnfs"]: vsp: Vsp = Vsp(name=f"{vnf['vnf_name']}_VSP") vf: Vf = Vf(name=vnf['vnf_name'], vsp=vsp) + if all([x in vnf for x in ["vnf_artifact_type", + "vnf_artifact_name", + "vnf_artifact_label", + "vnf_artifact_file_path"]]): + vf.create() + 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"] + ) vf.onboard() -- cgit 1.2.3-korg