To use api, you can use like this.

https://github.com/TakeshiTseng/SDN-Work/blob/master/GetSwitches/GetSwitches.py


Or you can just use rest_topology
https://github.com/osrg/ryu/blob/master/ryu/app/rest_topology.py

if you want to use restful api to get all switches/links


2015-04-13 19:33 GMT+08:00 Ruchika Luthra <[email protected]
>:

> hi,
>
> Thank you for replying.
> The problem is that whenever I try to run api.py  using the following
> command, it starts and stops on its own in a minute
>
> sudo ./bin/ryu-manager ryu/topology/api.py
>
> How to make use of this script? Is any other script calling this one?
>
> On Mon, Apr 13, 2015 at 12:57 PM, Yi Tseng <[email protected]> wrote:
>
>> Hi
>>
>> To get all switch and link information, you can use :
>> ryu/topology/api.py
>>
>> To get all hosts, you need to record host information while controller
>> receive packet in message, for example:
>> https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py#L89
>>
>>
>>
>>
>> Yi
>>
>>
>> 2015-04-13 18:32 GMT+08:00 Ruchika Luthra <
>> [email protected]>:
>>
>>> Hello,
>>>
>>> Is there any way app/script/module in Ryu controller using which we can
>>> dump info about the switch and its ports, as in which what is connected at
>>> which port?
>>>
>>> My main aim is to know whether the host is directly connected to the
>>> switch or reachable via other switch connected to this switch.
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>>
>> --
>>
>> -----
>> Yi Tseng (a.k.a Takeshi)
>> Taiwan National Chiao Tung University
>> Department of Computer Science
>>
>> -----
>>
>
>
>
> --
> Ruchika Luthra
> M.E (CS) 4th Sem
> BITS Pilani
>
>


-- 

-----
Yi Tseng (a.k.a Takeshi)
Taiwan National Chiao Tung University
Department of Computer Science

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