On Wed, 25 Sep 2013 11:18:31 +0100
Adam Humphreys <[email protected]> wrote:
> I am new to using Ryu with Openflow, and am currently trying to familiarise
> myself with it in order to run some basic tests on Openflow functionality.
>
> A problem I have encountered is that error handling does not seem to work.
> When the Openflow stack raises an error, it sends this message out to the
> controller, however, the Ryu script does not detect this.
>
> I would expect it to work in the same manner as the following snippet:
>
> @set_ev_cls(ofp_event.EventOFPEchoReply, MAIN_DISPATCHER)
> def rxEchoReply(self, ev):
> ...
>
> I attempted to add a decorator to expect an ofp_event of type
> EventOFPErrorMsg, but this did not yield any results. Error handling would be
> a very useful feature, so I'm wondering if this is yet to be implemented, or
> if I'm just using it incorrectly!
Hmm, the following handler works for me.
@handler.set_ev_cls(ofp_event.EventOFPErrorMsg, handler.MAIN_DISPATCHER)
def error_msg_handler(self, ev):
msg = ev.msg
print 'error msg ev %s type 0x%x code 0x%x' % (msg, msg.type, msg.code)
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel