From: garciadeblas Date: Tue, 22 Oct 2024 11:59:45 +0000 (+0200) Subject: Reduce log level to debug in update_operation_history X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F14668%2F2;p=osm%2FLCM.git Reduce log level to debug in update_operation_history Change-Id: I835e7d0a0171fef78cea44b4c4e6d88fcc5180a1 Signed-off-by: garciadeblas --- diff --git a/osm_lcm/lcm_utils.py b/osm_lcm/lcm_utils.py index e7b85cd..3106070 100644 --- a/osm_lcm/lcm_utils.py +++ b/osm_lcm/lcm_utils.py @@ -238,27 +238,27 @@ class LcmBase: ) op_id = content["current_operation"] - self.logger.info("OP_id: {}".format(op_id)) - length = 0 + self.logger.debug("OP_id: {}".format(op_id)) + op_num = 0 for operation in content["operationHistory"]: - self.logger.info("Operations: {}".format(operation)) + self.logger.debug("Operations: {}".format(operation)) if operation["op_id"] == op_id: - self.logger.info("Length: {}".format(length)) + self.logger.debug("Found operation number: {}".format(op_num)) now = time() if workflow_status: - content["operationHistory"][length]["workflowState"] = "COMPLETED" + content["operationHistory"][op_num]["workflowState"] = "COMPLETED" else: - content["operationHistory"][length]["workflowState"] = "ERROR" + content["operationHistory"][op_num]["workflowState"] = "ERROR" if resource_status: - content["operationHistory"][length]["resourceState"] = "READY" + content["operationHistory"][op_num]["resourceState"] = "READY" else: - content["operationHistory"][length]["resourceState"] = "NOT_READY" + content["operationHistory"][op_num]["resourceState"] = "NOT_READY" - content["operationHistory"][length]["endDate"] = now + content["operationHistory"][op_num]["endDate"] = now break - length += 1 - self.logger.info("content: {}".format(content)) + op_num += 1 + self.logger.debug("content: {}".format(content)) return content