hi everyone
Firstly, i am sorry for my careless in subject of previous email , thank you
for the answer of yamamoto, as you said, my app get_link before the topology
app finished discoverying links, but my app sometime can get all the links,
sometimes it can not. my function get_topology_data() is triggered by
event.EventSwitchEnter, is the topology app also triggered by this event? if it
is true, can i add a sleep(2) in my function to wait the accomplishment of
discoverying links?
@set_ev_cls(event.EventSwitchEnter)
def get_topology_data(self, ev):
sleep(2)
switch_list = get_switch(self.topology_api_app, None)
switches=[switch.dp.id for switch in switch_list]
self.net.add_nodes_from(switches)
links_list = get_link(self.topology_api_app, None)
links=[(link.src.dpid,link.dst.dpid,{'port':link.src.port_no}) for link
in links_list]
self.net.add_edges_from(links)
links=[(link.dst.dpid,link.src.dpid,{'port':link.dst.port_no}) for link
in links_list]
self.net.add_edges_from(links)
print "**********List of links"
print self.net.edges()------------------------------------------------------------------------------
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