Hello everyone,
I want to get the port information from the link_add event. I couldn't find any 
getter function for port number. 
for the code below-
@set_ev_cls(EventLinkAdd, MAIN_DISPATCHER)
def _link_add_handler(self, ev):        link = ev.link
        #print "type of links:", type(link)
        print link
it prints-        
Link: Port<dpid=4, port_no=5, LIVE> to Port<dpid=6, port_no=3, LIVE>
So now I am getting the source port_no by using 
        src_port = int(str(link)[27:28])
But I am interested to know is there any standard method to get the port number 
from the link_add/ link_delete event?

------------------------------------------------------------------------------
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

Reply via email to