From 15b8a30111470e4e93099c987875fb273b7dbd60 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 23 Sep 2024 12:40:13 +0200 Subject: [PATCH] Update VIM operational state after successful ODU workflow Change-Id: If29bf096c2a82b937f38d20c749a1f439d5faa5b Signed-off-by: garciadeblas --- osm_lcm/k8s.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index 381195c..ab6652a 100644 --- a/osm_lcm/k8s.py +++ b/osm_lcm/k8s.py @@ -589,6 +589,14 @@ class CloudCredentialsLcm(LcmBase): resource_status, resource_msg ) ) + + content["_admin"]["operationalState"] = "ENABLED" + for operation in content["_admin"]["operations"]: + if operation["lcmOperationType"] == "create": + operation["operationState"] = "ENABLED" + self.logger.info("Content : {}".format(content)) + self.db.set_one("vim_accounts", {"_id": content["_id"]}, content) + return async def edit(self, op_id, op_params, content): -- 2.25.1