diff options
Diffstat (limited to 'src/onaptests/steps/onboard/vf.py')
-rw-r--r-- | src/onaptests/steps/onboard/vf.py | 9 |
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() |