From e547e71dd64e92751da1d840fcee39974d6e9f71 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 22 Oct 2024 13:59:45 +0200 Subject: [PATCH] Reduce log level to debug in update_operation_history Change-Id: I835e7d0a0171fef78cea44b4c4e6d88fcc5180a1 Signed-off-by: garciadeblas --- osm_lcm/lcm_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 -- 2.25.1