diff options
author | 2021-05-13 07:42:35 +0000 | |
---|---|---|
committer | 2021-05-13 07:42:35 +0000 | |
commit | 108836a4c6ef479fc83d6dcb5a823c309ca6b473 (patch) | |
tree | 4ef47588975e7a3a8521a00cc6aa4a8fa0a54af6 /src/onaptests/steps/onboard/service.py | |
parent | ed9b039e5f4b54aa6ebbef7aa95fafdce7d5ce75 (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/service.py')
-rw-r--r-- | src/onaptests/steps/onboard/service.py | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py index a8f5e31..6300a43 100644 --- a/src/onaptests/steps/onboard/service.py +++ b/src/onaptests/steps/onboard/service.py @@ -55,17 +55,16 @@ class ServiceOnboardStep(BaseStep): """ super().execute() service: Service = Service(name=settings.SERVICE_NAME, instantiation_type=settings.SERVICE_INSTANTIATION_TYPE) - if not service.created: - service.create() - if settings.VL_NAME != "": - vl: Vl = Vl(name=settings.VL_NAME) - service.add_resource(vl) - if settings.VF_NAME != "": - vf: Vf = Vf(name=settings.VF_NAME) - service.add_resource(vf) - if settings.PNF_NAME != "": - pnf: Pnf = Pnf(name=settings.PNF_NAME) - service.add_resource(pnf) + service.create() + if settings.VL_NAME != "": + vl: Vl = Vl(name=settings.VL_NAME) + service.add_resource(vl) + if settings.VF_NAME != "": + vf: Vf = Vf(name=settings.VF_NAME) + service.add_resource(vf) + if settings.PNF_NAME != "": + pnf: Pnf = Pnf(name=settings.PNF_NAME) + service.add_resource(pnf) # If the service is already distributed, do not try to checkin/onboard (replay of tests) # checkin is done if needed # If service is replayed, no need to try to re-onboard the model @@ -142,13 +141,12 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep): else: instantiation_type: ServiceInstantiationType = ServiceInstantiationType.A_LA_CARTE service: Service = Service(name=self.service_name, instantiation_type=instantiation_type) - if not service.created: - service.create() - self.declare_resources(service) - self.assign_properties(service) - # If the service is already distributed, do not try to checkin/onboard (replay of tests) - # checkin is done if needed - # If service is replayed, no need to try to re-onboard the model + service.create() + self.declare_resources(service) + self.assign_properties(service) + # If the service is already distributed, do not try to checkin/onboard (replay of tests) + # checkin is done if needed + # If service is replayed, no need to try to re-onboard the model if not service.distributed: try: service.checkin() |