Fix cluster-get-credentials to read op_id 36/14736/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 15 Nov 2024 11:00:06 +0000 (12:00 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 15 Nov 2024 11:00:21 +0000 (12:00 +0100)
Change-Id: I18fbdcd6bbe90c1a4239d0321997acef1731993a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/sol005/cluster.py

index 3225763..8aa4b28 100644 (file)
@@ -72,7 +72,8 @@ class Cluster(GenericOSMAPIObject):
         try:
             _, resp = self._http.get2_cmd(f"{self._apiBase}/{item['_id']}/get_creds")
             if resp:
-                op_id = json.loads(resp)
+                resp = json.loads(resp)
+                op_id = resp["op_id"]
                 # Wait loop to check if the operation completed
                 result = self.wait_for_operation_status(item["_id"], 10, op_id)
                 if result: