projects
/
osm
/
LCM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 2362 fixed:Operational-status is not getting updated when healing is triggered
[osm/LCM.git]
/
osm_lcm
/
ROclient.py
diff --git
a/osm_lcm/ROclient.py
b/osm_lcm/ROclient.py
index
cdbde9c
..
e731ec1
100644
(file)
--- a/
osm_lcm/ROclient.py
+++ b/
osm_lcm/ROclient.py
@@
-99,7
+99,7
@@
def remove_envelop(item, indata=None):
if len(indata) == 1 and "instance" in indata:
clean_indata = indata["instance"]
else:
if len(indata) == 1 and "instance" in indata:
clean_indata = indata["instance"]
else:
-
assert False, "remove_envelop with unknown item {}".format(item
)
+
raise ROClientException("remove_envelop with unknown item {}".format(item)
)
return clean_indata
return clean_indata
@@
-272,7
+272,7
@@
class ROClient:
elif item == "sdn":
return {"sdn_controller": indata}
else:
elif item == "sdn":
return {"sdn_controller": indata}
else:
-
assert False, "_create_envelop with unknown item {}".format(item
)
+
raise ROClientException("remove_envelop with unknown item {}".format(item)
)
@staticmethod
def update_descriptor(desc, kwargs):
@staticmethod
def update_descriptor(desc, kwargs):
@@
-359,9
+359,10
@@
class ROClient:
if item_id:
return item_id
desc = content[item]
if item_id:
return item_id
desc = content[item]
- assert isinstance(
- desc, list
- ), "_get_item_uuid get a non dict with a list inside {}".format(type(desc))
+ if not isinstance(desc, list):
+ raise ROClientException(
+ "_get_item_uuid get a non dict with a list inside {}".format(type(desc))
+ )
uuid = None
for i in desc:
if item_id_name and i["name"] != item_id_name:
uuid = None
for i in desc:
if item_id_name and i["name"] != item_id_name: