1ed59505a8
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 <alanbarr2002@gmail.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>