On Thu,  4 Jul 2013 22:04:38 +0900
Isaku Yamahata <[email protected]> wrote:

> When independent methods for different dispatchers defined, all methods
> are called independent of state. This patch teach event dispatcher state.
> 
> The following class
> 
> class PacketTesting(app_manager.RyuApp):
> @set_ev_cls(ofp_event.EventOFPEchoRequest, MAIN_DISPATCHER)
> def _echo_rep_main(self, ev):
>     print "DEBUG: In Handler for Echo Request (Main)"
> 
> @set_ev_cls(ofp_event.EventOFPEchoRequest, CONFIG_DISPATCHER)
> def _echo_rep_conf(self, ev):
>     print "DEBUG: In Handler for Echo Request (Config)"
> 
> @set_ev_cls(ofp_event.EventOFPEchoRequest, HANDSHAKE_DISPATCHER)
> def _echo_rep_hand(self, ev):
>     print "DEBUG: In Handler for Echo Request (Handshake)"
> 
> output
> > EVENT ofp_event->PacketTesting EventOFPEchoRequest
> > DEBUG: In Handler for Echo Request (Config)
> > DEBUG: In Handler for Echo Request (Dead)
> > DEBUG: In Handler for Echo Request (Handshake)
> > DEBUG: In Handler for Echo Request (Main)
> 
> Reported-by: Alan Barr <[email protected]>
> Signed-off-by: Isaku Yamahata <[email protected]>
> ---
>  ryu/base/app_manager.py |   32 +++++++++++++++++++-------------
>  1 file changed, 19 insertions(+), 13 deletions(-)

Nice catch. Thanks, guys.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to