From a2e8b67fc840fff023ca29b00ebff4424ceba62a Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Thu, 27 Sep 2018 10:23:48 -0400 Subject: [PATCH] Add logging when a sm-api request received Add logging when a service sm-api request is received. Change-Id: Ifaf38eeeeeb44110a700976fedc247e30b0c7206 Related-Bug: #1791381 Signed-off-by: Bin Qian --- .../sm-api/sm_api/api/controllers/v1/servicenode.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service-mgmt-api/sm-api/sm_api/api/controllers/v1/servicenode.py b/service-mgmt-api/sm-api/sm_api/api/controllers/v1/servicenode.py index b3abb19f..5b04bb23 100755 --- a/service-mgmt-api/sm-api/sm_api/api/controllers/v1/servicenode.py +++ b/service-mgmt-api/sm-api/sm_api/api/controllers/v1/servicenode.py @@ -577,7 +577,7 @@ class ServiceNodeController(rest.RestController): ack_oper = sm_ack_dict['SM_API_MSG_NODE_OPER'].lower() ack_avail = sm_ack_dict['SM_API_MSG_NODE_AVAIL'].lower() - LOG.debug("sm-api _do_modify_command sm_ack_dict: %s ACK admin: " + LOG.info("sm-api _do_modify_command sm_ack_dict: %s ACK admin: " "%s oper: %s avail: %s." % (sm_ack_dict, ack_admin, ack_oper, ack_avail)) @@ -649,5 +649,8 @@ class ServiceNodeController(rest.RestController): if command.origin != "mtce" and command.origin != "sysinv": LOG.warn("sm-api unexpected origin: %s. Continuing." % command.origin) + else: + LOG.info("Received command %s from %s" % + (command.action, command.origin)) return self._do_modify_command(hostname, command)