From 1eb440b060d412f4f65431f8e3a2feed446facfd Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 5 Jun 2020 05:37:08 +0300 Subject: ipmi: write client ip --- kvmd/apps/ipmi/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kvmd') diff --git a/kvmd/apps/ipmi/server.py b/kvmd/apps/ipmi/server.py index 1173d395..084656de 100644 --- a/kvmd/apps/ipmi/server.py +++ b/kvmd/apps/ipmi/server.py @@ -78,7 +78,7 @@ class IpmiServer(BaseIpmiServer): # pylint: disable=too-many-instance-attribute def handle_raw_request(self, request: Dict, session: IpmiServerSession) -> None: handler = { - (6, 1): lambda _, session: self.send_device_id(session), # Get device ID + (6, 1): (lambda _, session: self.send_device_id(session)), # Get device ID (0, 1): self.__get_chassis_status_handler, # Get chassis status (0, 2): self.__chassis_control_handler, # Chassis control }.get((request["netfn"], request["command"])) @@ -121,8 +121,8 @@ class IpmiServer(BaseIpmiServer): # pylint: disable=too-many-instance-attribute async def runner(): # type: ignore logger = get_logger(0) credentials = self.__auth_manager.get_credentials(session.username.decode()) - logger.info("Performing request %s from user %r (IPMI) as %r (KVMD)", - name, credentials.ipmi_user, credentials.kvmd_user) + logger.info("Client %s: Performing request %s from user %r (IPMI) as %r (KVMD)", + session.sockaddr[0], name, credentials.ipmi_user, credentials.kvmd_user) try: async with self.__kvmd.make_session(credentials.kvmd_user, credentials.kvmd_passwd) as kvmd_session: method = functools.reduce(getattr, method_path.split("."), kvmd_session) -- cgit v1.2.3