From 108836a4c6ef479fc83d6dcb5a823c309ca6b473 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 13 May 2021 07:42:35 +0000 Subject: Revert "[TEST] Do not try to recreate already created SDC resources" This reverts commit ed9b039e5f4b54aa6ebbef7aa95fafdce7d5ce75. Reason for revert: regression observed in all chains and gating Change-Id: I2b310ac172bec7880687dae591f62f5d02814b07 Signed-off-by: morganrol Issue-ID: TEST-333 --- src/onaptests/steps/onboard/pnf.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'src/onaptests/steps/onboard/pnf.py') 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() -- cgit 1.2.3-korg