apgw: fix log for bogus RPC

write to the proper logger.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2014-02-12 10:34:33 +09:00
parent 9131d24c00
commit 0f087cefeb
2 changed files with 7 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class RpcOFPManager(app_manager.RyuApp):
d[e.xid] = e.msgid
continue
except:
logger.info(_({'bogus RPC': data}))
self.logger.info(_({'bogus RPC': data}))
peer._endpoint.send_response(msgid, error=error, result=result)

View File

@ -569,6 +569,12 @@ class TestRpcOFPManager(unittest.TestCase):
m._handler_datapath(ev)
eq_(len(peer.wait_for_ofp_resepnse), 0)
# bogus RPC
with hub.Timeout(2):
m._rpc_events.put((peer, rpc.MessageType.REQUEST,
(msgid, 'you')))
hub.sleep(0.5)
def test_rpc_message_thread_12(self):
self._test_rpc_message_thread(ofproto_v1_2, ofproto_v1_2_parser)