diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2021-04-27 12:26:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-04-27 12:26:25 +0000 |
commit | 83e0a5a4fa8a7dedc1af3c3c0c5cb1706a5f2646 (patch) | |
tree | 0952963652bddbe3875fe8f94bf2e870ee658d03 /src/onaptests/steps/onboard/pnf.py | |
parent | 0a9bc9eba1ada15ec1a2934f3baa465804f20e76 (diff) | |
parent | f901c5e96022a41db4bf2f4437b39999e46f5b97 (diff) |
Merge "Wait for pnf simulator"
Diffstat (limited to 'src/onaptests/steps/onboard/pnf.py')
-rw-r--r-- | src/onaptests/steps/onboard/pnf.py | 13 |
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"], |