hi,

probably your app did get_link before the topology app
finished discovering links.

btw can you use english subject?
the subject of this mail confused my MUA a lot.

YAMAMOTO Takashi

> hi
> my ryu is 3.19,and mininet is 2.2.0, i write a app to discovery the links. i 
> start mininet firstly,and the start the ryu, but the ryu usually can not find 
> the links, if i restart the ryu sereral times, it may find the correct 
> links,it confused me!
> anyone can help me, my code is below:
> @set_ev_cls(event.EventSwitchEnter)
>     def get_topology_data(self, ev):
>         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()
> the result of running is below:
> root@john-S3210SH:/home/wyxapp# ryu-manager --observe-links shortestpath_13.py
> loading app shortestpath_13.py
> loading app ryu.topology.switches
> loading app ryu.controller.ofp_handler
> instantiating app None of DPSet
> creating context dpset
> instantiating app shortestpath_13.py of ProjectController
> instantiating app ryu.topology.switches of Switches
> instantiating app ryu.controller.ofp_handler of OFPHandler
> **********List of links
> []
> **********List of links
> []
> **********List of links
> []

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