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 <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2018-09-27 10:23:48 -04:00
parent 208749ee3b
commit a2e8b67fc8
1 changed files with 4 additions and 1 deletions

View File

@ -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)