Hi ,Raymond

On my environment, dpset.EventPortAdd was properly called.
Could you share your log message of ryu and "ryu_handler.py" ?

Thanks,
Fujimoto

On 2017年05月09日 01:11, Raymond Burkholder wrote:
> I have three event handlers as shown.  The dpset.EvenPortAdd doesn't seem to
> be called.  Is there something over-riding that event?  I can see the
> ..Delete and ..Modify events being called.  The decorator  seems correct.  I
> am using Ryu 4.13.
>
> Even the ofp.OFPPR_ADD doesn't seem to be called in
> ofp_event.EventOFPPortStatus, although ..Modify and ..Delete are triggered.
>
> I start with a simple command line (which is my own custom handler with the
> code show below:
>    ryu run --verbose /vagrant/ryu_handler.py
>
> These are the imports:
>
> from ryu.base import app_manager
> from ryu.controller import ofp_event
> from ryu.controller.handler import MAIN_DISPATCHER, CONFIG_DISPATCHER,
> DEAD_DISPATCHER, HANDSHAKE_DISPATCHER
> from ryu.controller.handler import set_ev_cls
> from ryu.lib.packet import packet
> from ryu.lib.packet import ethernet
> from ryu.ofproto import ofproto_v1_4
> from ryu.controller.controller import Datapath
> from ryu.controller import dpset
>
> These are the event handler declarations:
>
>    @set_ev_cls(dpset.EventPortAdd)
>    def HandleEventPortAdd(self, event):
>      dp = event.dp # datapath
>      port = self.DecodePort( event.port )
>      self.UpdateConsulDatapathPort( dp.id, 'HandleEventPortAdd', port )
>
>    @set_ev_cls(dpset.EventPortDelete)
>    def HandleEventPortDelete(self, event):
>      dp = event.dp
>      port = self.DecodePort( event.port )
>      self.UpdateConsulDatapathPort( dp.id, 'HandleEventPortDelete', port )
>
>    @set_ev_cls(dpset.EventPortModify)
>    def HandleEventPortModify(self, event):
>      dp = event.dp
>      port = self.DecodePort( event.port )
>      self.UpdateConsulDatapathPort( dp.id, 'HandleEventPortModify', port )
>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to