summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7393b8)
Change-Id: Icf917868945bf4aa7132963b9bca113a48a4ea80
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
if "namespace" in op_status and "info" in op_status and \
"last_deployed" in op_status["info"] and "status" in op_status["info"] and \
"code" in op_status["info"]["status"] and "resources" in op_status["info"]["status"] and \
if "namespace" in op_status and "info" in op_status and \
"last_deployed" in op_status["info"] and "status" in op_status["info"] and \
"code" in op_status["info"]["status"] and "resources" in op_status["info"]["status"] and \
- "notes" in op_status["info"]["status"] and "seconds" in op_status["info"]["last_deployed"]:
+ "seconds" in op_status["info"]["last_deployed"]:
last_deployed_time = datetime.fromtimestamp(op_status["info"]["last_deployed"]["seconds"]).strftime("%a %b %d %I:%M:%S %Y")
print("LAST DEPLOYED: {}".format(last_deployed_time))
print("NAMESPACE: {}".format(op_status["namespace"]))
last_deployed_time = datetime.fromtimestamp(op_status["info"]["last_deployed"]["seconds"]).strftime("%a %b %d %I:%M:%S %Y")
print("LAST DEPLOYED: {}".format(last_deployed_time))
print("NAMESPACE: {}".format(op_status["namespace"]))
print()
print("RESOURCES:")
print(op_status["info"]["status"]["resources"])
print()
print("RESOURCES:")
print(op_status["info"]["status"]["resources"])
- print("NOTES:")
- print(op_status["info"]["status"]["notes"])
+ if "notes" in op_status["info"]["status"]:
+ print("NOTES:")
+ print(op_status["info"]["status"]["notes"])
else:
print(op_info_status)
except Exception:
else:
print(op_info_status)
except Exception: