#NEWLINE# @ set_ev_cls ( dpset . EventDP , dpset . DPSET_EV_DISPATCHER ) #NEWLINE# def datapath_handler( self , ev ) : #NEWLINE# #INDENT# if ev . enter : #NEWLINE# #INDENT# RouterController . register_router ( self . dp ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# RouterController . unregister_router ( ev . dp )