self.logger.debug("Operations: {}".format(operation))
if operation["op_id"] == op_id:
self.logger.debug("Found operation number: {}".format(op_num))
- if workflow_status:
- operation["workflowState"] = "COMPLETED"
- operation["result"] = True
- else:
- operation["workflowState"] = "ERROR"
- operation["operationState"] = "FAILED"
- operation["result"] = False
-
- if resource_status:
- operation["resourceState"] = "READY"
- operation["operationState"] = "COMPLETED"
- operation["result"] = True
- else:
- operation["resourceState"] = "NOT_READY"
- operation["operationState"] = "FAILED"
- operation["result"] = False
+ if workflow_status is not None:
+ if workflow_status:
+ operation["workflowState"] = "COMPLETED"
+ operation["result"] = True
+ else:
+ operation["workflowState"] = "ERROR"
+ operation["operationState"] = "FAILED"
+ operation["result"] = False
+
+ if resource_status is not None:
+ if resource_status:
+ operation["resourceState"] = "READY"
+ operation["operationState"] = "COMPLETED"
+ operation["result"] = True
+ else:
+ operation["resourceState"] = "NOT_READY"
+ operation["operationState"] = "FAILED"
+ operation["result"] = False
if op_end:
now = time()