X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2FROclient.py;h=ec31b398d1fea8d99f21e484f53a0380c0266d93;hb=47e86b567ff08adb8c77ce35a8e4feb4c7d59a3d;hp=fe12f8b3d7c3fb506fb49f5136933f6f62a8b4bf;hpb=22f4f9c3f2fef11377202b95fe2333b78255f8de;p=osm%2FLCM.git diff --git a/osm_lcm/ROclient.py b/osm_lcm/ROclient.py index fe12f8b..ec31b39 100644 --- a/osm_lcm/ROclient.py +++ b/osm_lcm/ROclient.py @@ -206,7 +206,7 @@ class ROClient: try: UUID(uuid_text) return True - except (ValueError, TypeError): + except Exception: return False @staticmethod @@ -693,7 +693,14 @@ class ROClient: all_tenants = None with aiohttp.ClientSession(loop=self.loop) as session: - return await self._del_item(session, self.client_to_RO[item], item_id_name, all_tenants=all_tenants) + result = await self._del_item(session, self.client_to_RO[item], item_id_name, all_tenants=all_tenants) + # in case of ns delete, get the action_id embeded in text + if item == "ns" and result.get("result"): + _, _, action_id = result["result"].partition("action_id=") + action_id, _, _ = action_id.partition(" ") + if action_id: + result["action_id"] = action_id + return result except aiohttp.errors.ClientOSError as e: raise ROClientException(e, http_code=504) except asyncio.TimeoutError: