Modify cluster (de)registration workflows to use new Jinja workflows
Change-Id: I1ab2f7b4a356d2cdd0939fa037743127cc56d33b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py
index a02e165..381195c 100644
--- a/osm_lcm/k8s.py
+++ b/osm_lcm/k8s.py
@@ -385,6 +385,14 @@
db_cluster = self.update_operation_history(db_cluster, workflow_status, None)
self.db.set_one("clusters", {"_id": db_cluster["_id"]}, db_cluster)
+ # Clean items used in the workflow, no matter if the workflow succeeded
+ clean_status, clean_msg = await self.odu.clean_items_workflow(
+ "register_cluster", op_id, op_params, content
+ )
+ self.logger.info(
+ f"clean_status is :{clean_status} and clean_msg is :{clean_msg}"
+ )
+
if workflow_status:
resource_status, resource_msg = await self.odu.check_resource_status(
"register_cluster", op_id, op_params, content