From: garciadeblas Date: Mon, 18 Nov 2024 09:33:12 +0000 (+0100) Subject: Deregister cluster when delete cluster is called for imported clusters X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=HEAD;p=osm%2FLCM.git Deregister cluster when delete cluster is called for imported clusters Change-Id: I1387104d0e91bf997137d16d00d69f43623d5edf Signed-off-by: garciadeblas --- diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index 845a396..fb4a063 100644 --- a/osm_lcm/k8s.py +++ b/osm_lcm/k8s.py @@ -323,6 +323,8 @@ class ClusterLcm(GitOpsLcm): async def delete(self, op_id, op_params, content): self.logger.info("cluster delete Enter") db_cluster = content["cluster"] + if db_cluster["created"] == "false": + return await self.deregister(op_id, op_params, content) _, workflow_name = await self.odu.launch_workflow( "delete_cluster", op_id, op_params, content