aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/vsp.py
diff options
context:
space:
mode:
authorandreasgeissler <andreas-geissler@telekom.de>2020-10-12 18:05:46 +0200
committermrichomme <morgan.richomme@orange.com>2020-10-16 10:06:41 +0200
commit8642324e0b95b9efef53a7d62b419d72aed617b6 (patch)
tree40d76e3b8d312033aad592e8629cf538d36d2eb3 /src/onaptests/steps/onboard/vsp.py
parente39466fadd289f279509e460f6222d9c08f53c56 (diff)
Added basic_network testcase
Issue-ID: TEST-255 Signed-off-by: andreasgeissler <andreas-geissler@telekom.de> Change-Id: I86b34c0980cee7a5824231591a60d1f50dfe4f37 Signed-off-by: mrichomme <morgan.richomme@orange.com>
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()