if nsr_deployed.get("VCA"):
stage[1] = "Deleting all execution environments."
self.logger.debug(logging_text + stage[1])
- if nsr_deployed.get("VCA").get("type") != "helm-v3":
- vca_id = self.get_vca_id({}, db_nsr)
- task_delete_ee = asyncio.ensure_future(
- asyncio.wait_for(
- self._delete_all_N2VC(db_nsr=db_nsr, vca_id=vca_id),
- timeout=self.timeout.charm_delete,
- )
- )
- tasks_dict_info[task_delete_ee] = "Terminating all VCA"
- else:
+ helm_vca_list = get_deployed_vca(db_nsr, {"type": "helm-v3"})
+ if helm_vca_list:
# Delete Namespace and Certificates
await self.vca_map["helm-v3"].delete_tls_certificate(
namespace=db_nslcmop["nsInstanceId"],
await self.vca_map["helm-v3"].delete_namespace(
namespace=db_nslcmop["nsInstanceId"],
)
+ else:
+ vca_id = self.get_vca_id({}, db_nsr)
+ task_delete_ee = asyncio.ensure_future(
+ asyncio.wait_for(
+ self._delete_all_N2VC(db_nsr=db_nsr, vca_id=vca_id),
+ timeout=self.timeout.charm_delete,
+ )
+ )
+ tasks_dict_info[task_delete_ee] = "Terminating all VCA"
# Delete from k8scluster
stage[1] = "Deleting KDUs."