Skip to content
Snippets Groups Projects
Commit bc3efb24 authored by garciadeblas's avatar garciadeblas
Browse files

Support return value id for create operations in adv cluster mgmt


Change-Id: I9db03f76b5ce263501edd198ec9abbf80830ed34
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent bd7c1f6c
No related branches found
No related tags found
No related merge requests found
......@@ -274,9 +274,12 @@ class GenericOSMAPIObject(ABC):
if resp:
resp = json.loads(resp)
self._logger.debug(f"Resp: {resp}")
if not resp or "_id" not in resp:
if not resp or ("_id" not in resp and "id" not in resp):
raise ClientException("Unexpected response from server - {}".format(resp))
print(resp["_id"])
if "id" in resp:
print(resp["id"])
else:
print(resp["_id"])
if tempdir:
tempdir.cleanup()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment