hi
i want to detect the link fault, when the link or the port is down, i can
detect it and recovery the fault,my detect code is below,i use mininet to
emulate the link failure using the command( link s1 s2 down),in my app, i can
monitor the EventOFPPortStatus,but the reason is not ofproto.OFPPR_DELETE,
someone can help me!
--------------------------------------------------------------------
def remove_flow(self,datapath,match):
ofproto=datapath.ofproto
parser=datapath.ofproto_parser
mod=parser.OFPFlowMod(datapath=datapath,command=ofproto.OFPFC_DELETE,out_group=ofproto.OFPG_ANY,out_port=ofproto.OFPP_ANY,match=match)
datapath.send_msg(mod)
@set_ev_cls(ofp_event.EventOFPPortStatus,MAIN_DISPATCHER)
def _port_status_handler(self,ev):
msg=ev.msg
parser=msg.datapath.ofproto_parser
reason=msg.reason
port_no=msg.desc.port_no
dpid=msg.datapath.id
ofproto=msg.datapath.ofproto
if reason==ofproto.OFPPR_DELETE:
match=parser.OFPMatch(in_port=port_no)
self.remove_flow(msg.datapath,match)
match=parser.OFPMatch(out_port=port_no)
self.remove_flow(msg.datapath,match)
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel