From 12470811bd2ddcc182e2122464838c5f3713e2c7 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 18 Nov 2024 10:33:12 +0100 Subject: [PATCH] Deregister cluster when delete cluster is called for imported clusters Change-Id: I1387104d0e91bf997137d16d00d69f43623d5edf Signed-off-by: garciadeblas --- osm_lcm/k8s.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index 845a3960..fb4a063f 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 -- 2.25.1