aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/vf.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/vf.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/vf.py')
-rw-r--r--src/onaptests/steps/onboard/vf.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/onaptests/steps/onboard/vf.py b/src/onaptests/steps/onboard/vf.py
index f26d66d..18b56f3 100644
--- a/src/onaptests/steps/onboard/vf.py
+++ b/src/onaptests/steps/onboard/vf.py
@@ -61,7 +61,8 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep):
def execute(self):
"""Onboard Vfs from YAML template."""
super().execute()
- 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)
- vf.onboard()
+ if "vnfs" in self.yaml_template:
+ 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)
+ vf.onboard()