aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/pnf.py
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2021-04-12 09:08:46 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2021-04-21 06:52:19 +0000
commitf901c5e96022a41db4bf2f4437b39999e46f5b97 (patch)
treec1a8f32569629e04c9738bad5342a23db4124948 /src/onaptests/steps/onboard/pnf.py
parente94d90fb8fb843ee577d0fb05809c9e48c223ba8 (diff)
Wait for pnf simulator
Add VSP for PNF Issue-ID: TEST-280 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: If2476f5f9f9fc8d4c14c5dd398a8a659e7fe3e9a
Diffstat (limited to 'src/onaptests/steps/onboard/pnf.py')
-rw-r--r--src/onaptests/steps/onboard/pnf.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/onaptests/steps/onboard/pnf.py b/src/onaptests/steps/onboard/pnf.py
index 547e0c0..6250d7e 100644
--- a/src/onaptests/steps/onboard/pnf.py
+++ b/src/onaptests/steps/onboard/pnf.py
@@ -3,8 +3,9 @@
from onapsdk.configuration import settings
from onapsdk.sdc.pnf import Pnf
from onapsdk.sdc.vendor import Vendor
+from onapsdk.sdc.vsp import Vsp
from ..base import BaseStep, YamlTemplateBaseStep
-from .vendor import VendorOnboardStep
+from .vsp import VspOnboardStep, YamlTemplateVspOnboardStep
class PnfOnboardStep(BaseStep):
@@ -21,7 +22,7 @@ class PnfOnboardStep(BaseStep):
"""
super().__init__(cleanup=cleanup)
- self.add_step(VendorOnboardStep(cleanup=cleanup))
+ self.add_step(VspOnboardStep(cleanup=cleanup))
@property
def description(self) -> str:
@@ -73,7 +74,7 @@ class YamlTemplatePnfOnboardStep(YamlTemplateBaseStep):
"""
super().__init__(cleanup=cleanup)
- self.add_step(VendorOnboardStep(cleanup=cleanup))
+ self.add_step(YamlTemplateVspOnboardStep(cleanup=cleanup))
@property
def description(self) -> str:
@@ -104,7 +105,11 @@ class YamlTemplatePnfOnboardStep(YamlTemplateBaseStep):
if "pnfs" in self.yaml_template:
vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
for pnf in self.yaml_template["pnfs"]:
- pnf_obj: Pnf = Pnf(name=pnf["pnf_name"], vendor=vendor)
+ if "heat_files_to_upload" in pnf:
+ vsp: Vsp = Vsp(name=f"{pnf['pnf_name']}_VSP")
+ else:
+ vsp = None
+ pnf_obj: Pnf = Pnf(name=pnf["pnf_name"], vendor=vendor, vsp=vsp)
pnf_obj.create()
pnf_obj.add_deployment_artifact(
artifact_type=pnf["pnf_artifact_type"],