aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/vf.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2021-05-13 07:42:35 +0000
committerMorgan Richomme <morgan.richomme@orange.com>2021-05-13 07:42:35 +0000
commit108836a4c6ef479fc83d6dcb5a823c309ca6b473 (patch)
tree4ef47588975e7a3a8521a00cc6aa4a8fa0a54af6 /src/onaptests/steps/onboard/vf.py
parented9b039e5f4b54aa6ebbef7aa95fafdce7d5ce75 (diff)
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 <morgan.richomme@orange.com> Issue-ID: TEST-333
Diffstat (limited to 'src/onaptests/steps/onboard/vf.py')
-rw-r--r--src/onaptests/steps/onboard/vf.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/onaptests/steps/onboard/vf.py b/src/onaptests/steps/onboard/vf.py
index d26e123..5f5fc4d 100644
--- a/src/onaptests/steps/onboard/vf.py
+++ b/src/onaptests/steps/onboard/vf.py
@@ -40,8 +40,7 @@ class VfOnboardStep(BaseStep):
super().execute()
vsp: Vsp = Vsp(name=settings.VSP_NAME)
vf: Vf = Vf(name=settings.VF_NAME, vsp=vsp)
- if not vf.created:
- vf.onboard()
+ vf.onboard()
class YamlTemplateVfOnboardStep(YamlTemplateBaseStep):
@@ -86,16 +85,15 @@ class YamlTemplateVfOnboardStep(YamlTemplateBaseStep):
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)
- if not vf.created:
- if all([x in vnf for x in ["vnf_artifact_type",
- "vnf_artifact_name",
- "vnf_artifact_label",
- "vnf_artifact_file_path"]]):
- vf.create()
- vf.add_deployment_artifact(
- artifact_type=vnf["vnf_artifact_type"],
- artifact_name=vnf["vnf_artifact_name"],
- artifact_label=vnf["vnf_artifact_label"],
- artifact=vnf["vnf_artifact_file_path"]
- )
- vf.onboard()
+ if all([x in vnf for x in ["vnf_artifact_type",
+ "vnf_artifact_name",
+ "vnf_artifact_label",
+ "vnf_artifact_file_path"]]):
+ vf.create()
+ vf.add_deployment_artifact(
+ artifact_type=vnf["vnf_artifact_type"],
+ artifact_name=vnf["vnf_artifact_name"],
+ artifact_label=vnf["vnf_artifact_label"],
+ artifact=vnf["vnf_artifact_file_path"]
+ )
+ vf.onboard()