projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feature: helm charts repos with certs
[osm/osmclient.git]
/
osmclient
/
common
/
wait.py
diff --git
a/osmclient/common/wait.py
b/osmclient/common/wait.py
index
d3f673c
..
3f5b51f
100644
(file)
--- a/
osmclient/common/wait.py
+++ b/
osmclient/common/wait.py
@@
-58,6
+58,8
@@
def _get_finished_states(entity):
"""
if entity == "NS" or entity == "NSI":
return ("COMPLETED", "PARTIALLY_COMPLETED"), ("FAILED_TEMP", "FAILED")
"""
if entity == "NS" or entity == "NSI":
return ("COMPLETED", "PARTIALLY_COMPLETED"), ("FAILED_TEMP", "FAILED")
+ elif entity == "OPCANCEL":
+ return ("FAILED_TEMP"), ("COMPLETED",)
else:
return ("ENABLED",), ("ERROR",)
else:
return ("ENABLED",), ("ERROR",)
@@
-72,7
+74,7
@@
def _get_operational_state(resp, entity):
:param entity: can be NS, NSI, or other
:return: status of the operation
"""
: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")
return resp.get("operationState")
else:
return resp.get("_admin", {}).get("operationalState")
@@
-111,7
+113,7
@@
def _get_detailed_status(resp, entity):
:param entity: can be NS, NSI, or other
:return:
"""
: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:
# For NS and NSI, 'detailed-status' is a JSON "root" member:
return resp.get("detailed-status")
else: