aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/vsp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/onboard/vsp.py')
-rw-r--r--src/onaptests/steps/onboard/vsp.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/onaptests/steps/onboard/vsp.py b/src/onaptests/steps/onboard/vsp.py
index ba6020a..e0761ab 100644
--- a/src/onaptests/steps/onboard/vsp.py
+++ b/src/onaptests/steps/onboard/vsp.py
@@ -68,10 +68,11 @@ class YamlTemplateVspOnboardStep(YamlTemplateBaseStep):
"""
super().execute()
vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
- for vnf in self.yaml_template["vnfs"]:
- with open(
- sys.path[-1] + "/" + vnf["heat_files_to_upload"], "rb") as package:
- vsp: Vsp = Vsp(name=f"{vnf['vnf_name']}_VSP",
- vendor=vendor,
- package=package)
- vsp.onboard()
+ if "vnfs" in self.yaml_template:
+ for vnf in self.yaml_template["vnfs"]:
+ with open(
+ sys.path[-1] + "/" + vnf["heat_files_to_upload"], "rb") as package:
+ vsp: Vsp = Vsp(name=f"{vnf['vnf_name']}_VSP",
+ vendor=vendor,
+ package=package)
+ vsp.onboard()