Hi,
> 1. I am able to run simple_switch_13 and ofctl_rest by the command cd ryu &&
> ./bin/ryu-manager --verbose ryu/app/simple_switch_13.py ryu/app/ofctl_rest.py.
> However I want to know whether there is any method to import ofctl_rest in
> simple_switch_13 and run *only cd ryu && ./bin/ryu-manager --verbose
> ryu/app/simple_switch_13.py* to access the REST APIs.
Hmmm... I don't know why you need to do so..., but please try the following.
$ git diff
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 06a5d0e..2218bbb 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -22,6 +22,8 @@ from ryu.lib.packet import packet
from ryu.lib.packet import ethernet
from ryu.lib.packet import ether_types
+app_manager.require_app('ryu.app.ofctl_rest')
+
class SimpleSwitch13(app_manager.RyuApp):
OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION]
> 2. I am running cd ryu && ./bin/ryu-manager --verbose
> ryu/app/simple_switch_13.py ryu/app/ofctl_rest.py ryu/app/rest_conf.py and the
> network is set on mininet with 1 switch and 3 hosts. However,* GET
> http://localhost:8080/v1.0/conf/switches *doesn't return any dpids as shown in
> the attached image. Please let me know if I am following the correct steps.**
Sorry, I don't know the details of rest_conf_switch.py.
rest_conf_switch.py provides only the REST API interface (receiver?) to
implement your own Ryu application, so you need to implement your own logic on
your application like rest_qos.py.
In other words, rest_conf_switch.py converts REST requests to events (e.g.,
EventConfSwitchSet, EventConfSwitchDel) and notify them to other applications.
https://github.com/osrg/ryu/blob/fb224e23b9b79bbebc1c500b4f51cb83bb5bd453/ryu/app/rest_qos.py#L306-L318
Currently, Ryu does not seem to have sample RESTful application for OVSDB
protocol.
Thanks,
Iwase
On 2018年02月03日 15:44, Kaustubh Shirodkar wrote:
Hi Iwase,
Thank you for your response. I have a few more queries.
1. I am able to run simple_switch_13 and ofctl_rest by the command *cd ryu &&
./bin/ryu-manager --verbose ryu/app/simple_switch_13.py ryu/app/ofctl_rest.py *.
However I want to know whether there is any method to import ofctl_rest in
simple_switch_13 and run *only cd ryu && ./bin/ryu-manager --verbose
ryu/app/simple_switch_13.py* to access the REST APIs.
2. I am running *cd ryu && ./bin/ryu-manager --verbose
ryu/app/simple_switch_13.py ryu/app/ofctl_rest.py ryu/app/rest_conf.py *and the
network is set on mininet with 1 switch and 3 hosts. However,* GET
http://localhost:8080/v1.0/conf/switches *doesn't return any dpids as shown in
the attached image. Please let me know if I am following the correct steps.**
Thanks & Regards,
Kaustubh Dinesh Shirodkar
On Fri, Feb 2, 2018 at 11:07 AM, Iwase Yusuke <iwase.yusu...@gmail.com
<mailto:iwase.yusu...@gmail.com>> wrote:
Hi,
You are talking about "ryu.app.ofctl_rest", right?
http://ryu.readthedocs.io/en/latest/app/ofctl_rest.html
<http://ryu.readthedocs.io/en/latest/app/ofctl_rest.html>
This application is an example application which provides the APIs related
to
the OpenFlow protocol and none to other protocols.
If you mean the OVSDB protocol, I guess you need to use another application
(e.g., "ryu.app.rest_conf_switch").
Also the parameters looking for seems to be the Floodlight controller
specific
parameters...
Thanks,
Iwase
On 2018年02月01日 22:13, Kaustubh Shirodkar wrote:
Hi Team,
I am currently working on RYU REST APIs and have come at a standstill
regarding the response received from them. I am facing the following
issues:
1. Is there any API by which I can extract the following parameters
related to the OVS Switch:
a. 'connectedSince'
b. 'inetAddress'
c. 'systemUptimeMsec
d. Switch Health Status e.g. "healthy":true
2. Also I need to know any device related API which would give me
'lastSeen' time of the device connected to any port.
3. I am using POSTMAN to verify the implementation of these APIs. When I
insert a flow for Floodlight Controller, I receive a JSON response for
"PUT" and "DELETE" methods. Is there any similar response received from
RYU controller?
Thanks & Regards,
Kaustubh Dinesh Shirodkar
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>>
Virus-free. www.avast.com <http://www.avast.com>
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
------------------------------------------------------------------------------
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