Re: [Ryu-devel] Adding REST to Ryu

2017-06-20 Thread Iwase Yusuke
Hi Douglas, On 2017年06月20日 23:22, Douglas Harewood-Gill wrote: > Hi again. Apologies for the delay in responding and thank you for getting > back to me so quickly. > > I finally figured out what you were telling me. So, below is what I found for > each step of the first thing you suggested. >

Re: [Ryu-devel] Adding REST to Ryu

2017-06-15 Thread Iwase Yusuke
Hi Douglas, On 2017年06月15日 23:55, Douglas Harewood-Gill wrote: > Hello again. Ok, My apologies bit I really need you to simplify this for me. > Starting with the first bit. > > 1) Ryu is definitely installed but do you know the command to check the > version? I have looked online but I can't f

Re: [Ryu-devel] Adding REST to Ryu

2017-06-15 Thread Douglas Harewood-Gill
Hello again. Ok, My apologies bit I really need you to simplify this for me. Starting with the first bit. 1) Ryu is definitely installed but do you know the command to check the version? I have looked online but I can't find anything specific. 2) Is there also a way to check that Ryu is installed

Re: [Ryu-devel] Adding REST to Ryu

2017-06-14 Thread Iwase Yusuke
Hi Douglas, On 2017年06月14日 21:41, Douglas Harewood-Gill wrote: > Hi Iwase. I did try it the other way but the error "AttributeError: 'module' > object has not attribute "ofctl_rest" but it was worth trying so thank you. Hmmm... 'ryu.app.ofctl_rest' means the Python module path to Ryu's built-in

Re: [Ryu-devel] Adding REST to Ryu

2017-06-14 Thread Douglas Harewood-Gill
Hi Iwase. I did try it the other way but the error "AttributeError: 'module' object has not attribute "ofctl_rest" but it was worth trying so thank you. Regarding the instructions you sent me for altering Ryu, is there any chance you could explain them a bit more please? I am having a little troub

Re: [Ryu-devel] Adding REST to Ryu

2017-06-13 Thread Iwase Yusuke
Hi Douglas, Hmmm... how about swapping the order of arguments? e.g) if __name__ == "__main__": manager.main(args=['ryu.app.ofctl_rest'] + sys.argv) FYI, I guess Dr.Bernstein did "hack"(used "ryu.cmd.manager" directly) in order to add original CLI option like "--netfile" and "--widest_paths

Re: [Ryu-devel] Adding REST to Ryu

2017-06-13 Thread Douglas Harewood-Gill
Hi Iwase and thank you for getting back to me. The author of this program, Dr Bernstein added this line "from ryu.cmd import manager" which as far as I understand directly starts Ryu from within side L2DestForwardStaticRyu.py. Should be around line 29 I think. He had to do this he told me because h

Re: [Ryu-devel] Adding REST to Ryu

2017-06-12 Thread Iwase Yusuke
Hi Douglas, I checked "L2DestForwardStaticRyu.py", and it seems to be "hacked" to run app without "ryu-manager". To start the built-in Ryu application with "L2DestForwardStaticRyu.py", how about the following? The following appends to "ofctl_rest" app to the argument of "manager". e.g.) around li

Re: [Ryu-devel] Adding REST to Ryu

2017-06-09 Thread Douglas Harewood-Gill
Hi Iwase. Thank you for contacting me and apologies for my delay in responding. I have tried what you have suggested but the problem I have is that the L2DestForwardStaticRyu.py program is designed to run on its own. It imports the the ryu.cmd import manager and uses the Ryu controller but you star

Re: [Ryu-devel] Adding REST to Ryu

2017-06-07 Thread Iwase Yusuke
Hi Douglas, Excuse me for cutting in. Just for getting flow statistics, how about running your app and ofctl_rest together as Fujimoto said. e.g.) $ ryu-manager your_app.py ryu.app.ofctl_rest If you want to implement your own REST APIs on your app, Ryu-Book is the most helpful as far as I know

Re: [Ryu-devel] Adding REST to Ryu

2017-06-07 Thread Douglas Harewood-Gill
Hi there. That is fantastic. Sounds exactly like what I am looking for so thank you. One last question for the minute. I know you provided a link but how do you implement this with custom Ryu controller code? My apologies if I am asking something really obvious. Cheers Douglas On 7 June 2017 a

Re: [Ryu-devel] Adding REST to Ryu

2017-06-06 Thread Fujimoto Satoshi
Hi, Douglas Ryu has ofctl_rest.py, which is a sample application and provides REST API to get flow statistics. http://ryu.readthedocs.io/en/latest/app/ofctl_rest.html I think it is better to use ofctl_rest.py than to implement your own REST API in your app. Thanks, Fujimoto On 2017

[Ryu-devel] Adding REST to Ryu

2017-06-06 Thread Douglas Harewood-Gill
Greetings I am a PhD student new to both Python and Ryu and I was wondering if anyone could give me some advice. I am using the Ryu controller program (L2DestForwardStaticRyu.py) provided by Dr Grey Bernstein ( https://www.grotto-networking.com/SDNfun.html#programming-switches-with-ryu) for shor