"""
if entity == "NS" or entity == "NSI":
return ("COMPLETED", "PARTIALLY_COMPLETED"), ("FAILED_TEMP", "FAILED")
+ elif entity == "OPCANCEL":
+ return ("FAILED_TEMP"), ("COMPLETED",)
else:
return ("ENABLED",), ("ERROR",)
:param entity: can be NS, NSI, or other
:return: status of the operation
"""
- if entity == "NS" or entity == "NSI":
+ if entity in ["NS", "NSI", "OPCANCEL"]:
return resp.get("operationState")
else:
return resp.get("_admin", {}).get("operationalState")
:param entity: can be NS, NSI, or other
:return:
"""
- if entity in ("NS", "NSI"):
+ if entity in ("NS", "NSI", "OPCANCEL"):
# For NS and NSI, 'detailed-status' is a JSON "root" member:
return resp.get("detailed-status")
else: