ryu/base/app_manager: introduce RyuApp:replay_to_request()
This is a handy method for event request/reply. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d763da58bc
commit
48b2665795
@ -123,6 +123,13 @@ class RyuApp(object):
|
|||||||
for observer in self.get_observers(ev, state):
|
for observer in self.get_observers(ev, state):
|
||||||
self.send_event(observer, ev)
|
self.send_event(observer, ev)
|
||||||
|
|
||||||
|
def reply_to_request(self, req, rep):
|
||||||
|
rep.dst = req.src
|
||||||
|
if req.sync:
|
||||||
|
self.send_reply(rep)
|
||||||
|
else:
|
||||||
|
self.send_event(rep.dst, rep)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
"""
|
"""
|
||||||
teardown method.
|
teardown method.
|
||||||
|
Loading…
Reference in New Issue
Block a user