Hi,

I think, the connection with the controller
may have gone wrong.

Following is a normal log.
--------------------
  connected socket:<SSLSocket fileno=4 sock=127.0.0.1:6633 
peer=127.0.0.1:56493> address:('127.0.0.1', 56493)
  hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x2fdce90>
  move onto config mode
  switch features ev version: 0x1 msg_type 0x6 xid 0xc23353f2 port 
OFPPhyPort(port_no=65534, hw_addr='\x16\xd8u\xe7[C', 
name='br0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=1, 
state=1, curr=0, advertised=0, supported=0, peer=0)
  move onto main mode
--------------------

the Switch features request(or reply) may be missing, I think.


*Case1
> linux-ksrb:~ # curl -i -H "Accept: application/json" -X GET
> http://localhost:8080/firewall/module/status
> HTTP/1.1 400 Bad Request
> Content-Type: text/html; charset=UTF-8
> Content-Length: 17
> Date: Wed, 10 Apr 2013 08:47:09 GMT
>
> Invalid switchI

First, rest_firewall does not recognize
the connection of the LINC switch.

And the operation has a bug, in case there is no connection.
It should be outputed like this.
  "firewall sw is not connected."
so I will send the patch later.



*Case2
> linux-ksrb:~ #  curl -X POST -d '{"dl_src": "12:34:56:78:9a:bc", "actions":
> "DENY"}'http://localhost:8080/firewall/rules/0000000000000001
> firewall sw is not connected. : switchID=0000000000000001

firewall does not recognize the connection of the switch.


*Case3/4
>   linux-ksrb:~ # curl -i -H "Accept: application/json" -X PUT -d
> '{"switchID":"0"}'http://localhost:8080/firewall/module/enable
> 404 Not Found
> The resource could not be found.

>     linux-ksrb:~ # curl -i -H "Accept: application/json" -X PUT -d
> '{"switchID":"all"}'http://localhost:8080/firewall/module/enable
> 404 Not Found
> The resource could not be found.


REST command's path is wrong.
Please send command as follows.

  PUT http://localhost:8080/firewall/module/enable/all
  PUT http://localhost:8080/firewall/module/enable/0000000000000001



Thanks.


(2013/04/10 3:07), [email protected] wrote:
> Date: Tue, 9 Apr 2013 10:54:35 -0700
> From: Shivaram Mysore<[email protected]>
> Subject: [Ryu-devel] problems with REST firewall service
> To:[email protected]
> Message-ID:
>       <cajry+jqh4djxyvh0akqo1z79xwpn8wmu4ypsnww4aecrfur...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
>
> I am trying to get REST firewall service working LINC.
>
> LINC is running in OF 1.2 mode.
>
> I start the controller like this:
> linux-ksrb:/usr/local/src/linc/ryu # bin/ryu-manager --verbose
> ryu/app/rest_firewall.py ryu/lib/ofctl_v1_2.py
> ...
> ...
> connected socket:<socket fileno=10 sock=10.x.x.200:6633
> peer=10.x.x.196:39920> address:('10.48.11.196', 39920)
> hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x1076510>
> move onto config mode
> 127.0.0.1 - - [2013-04-10 01:47:09] "GET /firewall/module/status HTTP/1.1"
> 400 142 0.002270
> 127.0.0.1 - - [2013-04-10 01:48:35] "POST /firewall/rules/0000000000000001
> HTTP/1.1" 400 182 0.000375
>
>>From another window on local host, I provide these commands
>
> linux-ksrb:~ # curl -i -H "Accept: application/json" -X GET
> http://localhost:8080/firewall/module/status
> HTTP/1.1 400 Bad Request
> Content-Type: text/html; charset=UTF-8
> Content-Length: 17
> Date: Wed, 10 Apr 2013 08:47:09 GMT
>
> Invalid switchI
> linux-ksrb:~ #  curl -X POST -d '{"dl_src": "12:34:56:78:9a:bc", "actions":
> "DENY"}'http://localhost:8080/firewall/rules/0000000000000001
> firewall sw is not connected. : switchID=0000000000000001linux-ksrb:~ #
> linux-ksrb:~ #
>
>
> I tried these too ...
>   linux-ksrb:~ # curl -i -H "Accept: application/json" -X PUT -d
> '{"switchID":"0"}'http://localhost:8080/firewall/module/enable
> HTTP/1.1 404 Not Found
> Content-Length: 52
> Content-Type: text/plain; charset=UTF-8
> Date: Wed, 10 Apr 2013 08:56:12 GMT
>
> 404 Not Found
>
> The resource could not be found.
>
>     linux-ksrb:~ # curl -i -H "Accept: application/json" -X PUT -d
> '{"switchID":"all"}'http://localhost:8080/firewall/module/enable
> HTTP/1.1 404 Not Found
> Content-Length: 52
> Content-Type: text/plain; charset=UTF-8
> Date: Wed, 10 Apr 2013 08:56:45 GMT
>
> 404 Not Found
>
> The resource could not be found.
>
>
> What am I doing wrong?
>
> Thanks
>
> /Shivaram


-- 
---------------------------------------
渡邊 文隆(わたなべ ふみたか)
 TEL:043-211-3721 (内線:26-6886)
 Mail:[email protected]
   NTTコムウェア株式会社  NW事業本部
   コアNW-S部 ノードBU ネットワークSE担当
---------------------------------------


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to