Hi,
When (or in which handler) do you call "get_link()" API?
Early point of starting up? For example, in your app's "__init__()" or
"switch_features_handler()", topology service could not yet discover links.
To discover all links, it will take some seconds and you need to wait for it.
For another approach, how about using "EventLinkAdd" or "EventLinkDelete" to
catch new links?
https://github.com/osrg/ryu/blob/8a48b62c90745e8112bb3f7277e8ac46dabb3e4e/ryu/topology/event.py#L104-L111
Thanks,
Iwase
On 2018年03月05日 10:24, Myra Sh wrote:
Thank you for your reply.
I added the same code. However, I only can see the list of switches and the list
of links is empty (Links between switches are wireless.)
I used the following lines to see links.
links_list = get_link(self.topology_api_app, None)
print links_list
Do you have any suggestion to fix the problem?
Thank you
On Thu, Mar 1, 2018 at 9:06 PM, Iwase Yusuke <iwase.yusu...@gmail.com
<mailto:iwase.yusu...@gmail.com>> wrote:
Hi,
You can enables the LLDP topology discovery feature, provided by
"ryu.topology"
module, to discover switches (and hosts) on your topology.
https://github.com/osrg/ryu/blob/master/ryu/topology/api.py
<https://github.com/osrg/ryu/blob/master/ryu/topology/api.py>
https://github.com/osrg/ryu/blob/master/ryu/topology/event.py
<https://github.com/osrg/ryu/blob/master/ryu/topology/event.py>
=================
...(snip)...
from ryu.topology import api as topology_api
from ryu.topology import event as topology_event
class MyApp(app_manager.RyuApp):
def my_handler(self, ...):
...(snip)...
switches = topology_api.get_all_switch(self)
...(snip)...
@set_ev_cls(topology_event.EventSwitchEnter)
def _switch_enter_handler(self, ev):
self.logger.info <http://self.logger.info>("switch connected: %s",
ev.switch)
...(snip)...
=================
Please note to enable Ryu's topology discovery service, please specify
"--observe-links" option to "ryu-manager".
$ ryu-manager --help
...(snip)...
--observe-links observe link discovery events.
...(snip)...
Thanks,
Iwase
On 2018年03月02日 05:13, Myra Sh wrote:
Hello,
I am new to Ryu controller. I have a wireless network with two
openvswitch(running on wireless nodes) both of them connected to Ryu.
Could you guide me how to enable topology discovery for this
wireless network in Ryu?
Using other SDN controllers, after connecting Openvswitches to the
controller, LLDP messages are exchanged between nodes in the network. Do
I need to activate LLDP messages manually in Ryu?
Thank you
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/ryu-devel
<https://lists.sourceforge.net/lists/listinfo/ryu-devel>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel