aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/pnf.py
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-05-13 07:47:04 +0000
committerGerrit Code Review <gerrit@onap.org>2021-05-13 07:47:04 +0000
commit5833341a74e7002bb7131aa848cd0eafbfc6c82d (patch)
tree276107b36d220fba519695e658057b5c5f09e530 /src/onaptests/steps/onboard/pnf.py
parentfa5a450766a95644af70bb3a648dcab936fc97e0 (diff)
parent108836a4c6ef479fc83d6dcb5a823c309ca6b473 (diff)
Merge "Revert "[TEST] Do not try to recreate already created SDC resources""
Diffstat (limited to 'src/onaptests/steps/onboard/pnf.py')
-rw-r--r--src/onaptests/steps/onboard/pnf.py34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/onaptests/steps/onboard/pnf.py b/src/onaptests/steps/onboard/pnf.py
index c5958dc..6250d7e 100644
--- a/src/onaptests/steps/onboard/pnf.py
+++ b/src/onaptests/steps/onboard/pnf.py
@@ -50,15 +50,14 @@ class PnfOnboardStep(BaseStep):
super().execute()
vendor: Vendor = Vendor(name=settings.VENDOR_NAME)
pnf: Pnf = Pnf(name=settings.PNF_NAME, vendor=vendor)
- if not pnf.created:
- pnf.create()
- pnf.add_deployment_artifact(
- artifact_type=settings.PNF_ARTIFACT_TYPE,
- artifact_name=settings.PNF_ARTIFACT_NAME,
- artifact_label=settings.PNF_ARTIFACT_LABEL,
- artifact=settings.PNF_ARTIFACT_FILE_PATH
- )
- pnf.onboard()
+ pnf.create()
+ pnf.add_deployment_artifact(
+ artifact_type=settings.PNF_ARTIFACT_TYPE,
+ artifact_name=settings.PNF_ARTIFACT_NAME,
+ artifact_label=settings.PNF_ARTIFACT_LABEL,
+ artifact=settings.PNF_ARTIFACT_FILE_PATH
+ )
+ pnf.onboard()
class YamlTemplatePnfOnboardStep(YamlTemplateBaseStep):
@@ -111,12 +110,11 @@ class YamlTemplatePnfOnboardStep(YamlTemplateBaseStep):
else:
vsp = None
pnf_obj: Pnf = Pnf(name=pnf["pnf_name"], vendor=vendor, vsp=vsp)
- if not pnf_obj.created:
- pnf_obj.create()
- pnf_obj.add_deployment_artifact(
- artifact_type=pnf["pnf_artifact_type"],
- artifact_name=pnf["pnf_artifact_name"],
- artifact_label=pnf["pnf_artifact_label"],
- artifact=pnf["pnf_artifact_file_path"]
- )
- pnf_obj.onboard()
+ pnf_obj.create()
+ pnf_obj.add_deployment_artifact(
+ artifact_type=pnf["pnf_artifact_type"],
+ artifact_name=pnf["pnf_artifact_name"],
+ artifact_label=pnf["pnf_artifact_label"],
+ artifact=pnf["pnf_artifact_file_path"]
+ )
+ pnf_obj.onboard()