Update VIM operational state after successful ODU workflow 91/14591/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 23 Sep 2024 10:40:13 +0000 (12:40 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 26 Sep 2024 09:39:10 +0000 (11:39 +0200)
Change-Id: If29bf096c2a82b937f38d20c749a1f439d5faa5b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_lcm/k8s.py

index 381195c..ab6652a 100644 (file)
@@ -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):