Hi.

/stats/flowentry/add returns 404 status only by the following points:

https://github.com/osrg/ryu/blob/master/ryu/app/ofctl_rest.py#L274
https://github.com/osrg/ryu/blob/master/ryu/app/ofctl_rest.py#L283

there is no problem at the latter.
please confirm the datapath id is "0000000000000031".

# curl http://127.0.0.1:8080/stats/switches

"dpid" requires the decimal number.

thanks.


On Mon, 20 Jan 2014 14:27:57 +0800
jalee <[email protected]> wrote:

> Dear Yuichi,
> 
> The problem still have. Please see log as below:
> 
> I use floodlight restAPI, it’s fine, I had reinstall new VM/Ubuntu 12.04.4 
> LTS/64bit but no help.
> 
> So if you have a time, please help resolve this issue.
> 
> Thanks,
> 
>  
> 
> Jalee
> 
>  
> 
> ================================================================ API log
> 
> Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.8.0-35-generic x86_64)
> 
>  
> 
> * Documentation:  https://help.ubuntu.com/
> 
>  
> 
> 0 packages can be updated.
> 
> 0 updates are security updates.
> 
>  
> 
> Last login: Mon Jan 20 13:10:23 2014 from 192.168.1.243
> 
> lab@lab-virtual-machine:~$ curl -d '{"dpid": "0000000000000031", 
> "priority":"32768", "match":{"in_port":"1"}, "actions":[{"type": "OUTPUT", 
> "port":"3"}]}' http://127.0.0.1:8080/stats/flowentry/add
> 
> lab@lab-virtual-machine:~$
> 
> lab@lab-virtual-machine:~$ curl -d '{"dpid": "0000000000000031", 
> "priority":"32768", "match":{"in_port":"1"}, "actions":[{"type": "OUTPUT", 
> "port":"3"}]}' http://10.1.25.56:8080/stats/flowentry/add
> 
> lab@lab-virtual-machine:~$
> 
> ============================================= controller log
> 
> lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packages/ryu/app$ 
> ryu-manager ofctl_rest.py
> 
> loading app ofctl_rest.py
> 
> loading app ryu.controller.ofp_handler
> 
> instantiating app None of DPSet
> 
> creating context dpset
> 
> creating context wsgi
> 
> instantiating app ryu.controller.ofp_handler of OFPHandler
> 
> instantiating app ofctl_rest.py of RestStatsApi
> 
> (7664) wsgi starting up on http://0.0.0.0:8080/
> 
> (7664) accepted ('127.0.0.1', 51780)
> 
> 127.0.0.1 - - [20/Jan/2014 13:13:16] "POST /stats/flowentry/add HTTP/1.1" 404 
> 122 0.006302
> 
> (8265) accepted ('10.1.25.56', 53801)
> 
> 10.1.25.56 - - [20/Jan/2014 14:19:36] "POST /stats/flowentry/add HTTP/1.1" 
> 404 122 0.005699
> 
>  
> 
> -----Original Message-----
> From: Yuichi Ito [mailto:[email protected]]
> Sent: Monday, January 20, 2014 8:31 AM
> To: jalee
> Cc: [email protected]
> Subject: Re: [Ryu-devel] About restAPI question
> 
>  
> 
> Hi.
> 
>  
> 
>> lab@lab-virtual-machine:~/ryu/ryu/lib$ curl -d '{"dpid": "0000000000000031", 
>> "priority":"32768", "match":{"in_port":"1"}, "actions":[{"port":"3"}]}' 
>> http://127.0.0.1:8080/stats/flowentry/add
> 
>  
> 
> please try with the action type such as:
> 
>  
> 
> curl -d '{"dpid": "0000000000000031", "priority":"32768", 
> "match":{"in_port":"1"}, "actions":[{"type": "OUTPUT", "port":"3"}]}' 
> http://127.0.0.1:8080/stats/flowentry/add
> 
>  
> 
> thanks.
> 
>  
> 
>  
> 
>  
> 
> On Mon, 20 Jan 2014 01:06:58 +0800
> 
> jalee <[email protected] <mailto:[email protected]>> wrote:
> 
>  
> 
>> DearAll,
> 
>> 
> 
>> I used restAPI add flow entry, but I still see the 404 message on the 
>> controller, could you tell me I miss something? Please see log as below.
> 
>> 
> 
>> I will use openflow 1.0 and 1.3.1 API function.
> 
>> 
> 
>> Thanks,
> 
>> 
> 
>>  
> 
>> 
> 
>> Jalee
> 
>> 
> 
>>  
> 
>> 
> 
>> ===================================== add flow entry
> 
>> 
> 
>> lab@lab-virtual-machine:~/ryu/ryu/lib$ curl -d '{"dpid": "0000000000000031", 
>> "priority":"32768", "match":{"in_port":"1"}, "actions":[{"port":"3"}]}' 
>> http://127.0.0.1:8080/stats/flowentry/add
> 
>> 
> 
>> lab@lab-virtual-machine:~/ryu/ryu/lib$
> 
>> 
> 
>>  
> 
>> 
> 
>> ===================================== controller log.
> 
>> 
> 
>> lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packages/ryu/app$ 
>> <mailto:lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packages/ryu/app$>
>>  ryu-manager ofctl_rest.py
> 
>> 
> 
>> loading app ofctl_rest.py
> 
>> 
> 
>> loading app ryu.controller.ofp_handler
> 
>> 
> 
>> instantiating app None of DPSet
> 
>> 
> 
>> creating context dpset
> 
>> 
> 
>> creating context wsgi
> 
>> 
> 
>> instantiating app ryu.controller.ofp_handler of OFPHandler
> 
>> 
> 
>> instantiating app ofctl_rest.py of RestStatsApi
> 
>> 
> 
>> (5400) wsgi starting up on http://0.0.0.0:8080/
> 
>> 
> 
>> (5400) accepted ('127.0.0.1', 51382)
> 
>> 
> 
>> 127.0.0.1 - - [20/Jan/2014 00:46:45] "POST /stats/flowentry/add HTTP/1.1" 
>> 404 122 0.003066
> 
>> 
> 
>> (5400) accepted ('127.0.0.1', 51383)
> 
>> 
> 
>> 127.0.0.1 - - [20/Jan/2014 00:46:56] "POST /stats/flowentry/add HTTP/1.1" 
>> 404 122 0.000631
> 
>> 
> 
>>  
> 
>> 
> 
>> lab@lab-virtual-machine:~$ netstat -tunlp
> 
>> 
> 
>> (Not all processes could be identified, non-owned process info
> 
>> 
> 
>> will not be shown, you would have to be root to see it all.)
> 
>> 
> 
>> Active Internet connections (only servers)
> 
>> 
> 
>> Proto Recv-Q Send-Q Local Address           Foreign Address         State    
>>    PID/Program name
> 
>> 
> 
>> tcp        0      0 0.0.0.0:6633            0.0.0.0:*               LISTEN   
>>    5400/python    
> 
>> 
> 
>> tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN   
>>    5400/python    
> 
>> 
> 
>> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN   
>>    -              
> 
>> 
> 
>> tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN   
>>    -              
> 
>> 
> 
>> tcp6       0      0 :::22                   :::*                    LISTEN   
>>    -              
> 
>> 
> 
>> tcp6       0      0 ::1:631                 :::*                    LISTEN   
>>    -              
> 
>> 
> 
>> udp        0      0 0.0.0.0:37593           0.0.0.0:*                        
>>    -              
> 
>> 
> 
>> udp        0      0 0.0.0.0:5353            0.0.0.0:*                        
>>    -              
> 
>> 
> 
>> udp        0      0 0.0.0.0:68              0.0.0.0:*                        
>>    -              
> 
>> 
> 
>> udp6       0      0 :::5353                 :::*                             
>>    -              
> 
>> 
> 
>> udp6       0      0 :::34974                :::*                             
>>    -              
> 
>> 
> 
>> lab@lab-virtual-machine:~$
> 
>> 
> 
>> 
> 
>> ====================================================================================
> 
>> This message may contain information which is private, privileged or 
>> confidential of INNO-Tech Network & Service Inc.
> 
>> If you are not the intended recipient of this message, please notify the 
>> sender and destroy/delete the message.
> 
>> Any review, retransmission, dissemination or other use of, or taking of any 
>> action in reliance upon this information,
> 
>> by persons or entities other than the intended recipient is prohibited.
> 
>> ====================================================================================
> 
>> 
> 
>> 
> 
>> ------------------------------------------------------------------------------
> 
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> 
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> 
>> Critical Workloads, Development Environments & Everything In Between.
> 
>> Get a Quote or Start a Free Trial Today.
> 
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> 
>> 
> 
>> 
> 
>> 
> 
>> _______________________________________________
> 
>> Ryu-devel mailing list
> 
>> [email protected] <mailto:[email protected]>
> 
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 
>> 
> 
>  
> 
>  
> 
> 
> ====================================================================================
> This message may contain information which is private, privileged or 
> confidential of INNO-Tech Network & Service Inc.
> If you are not the intended recipient of this message, please notify the 
> sender and destroy/delete the message.
> Any review, retransmission, dissemination or other use of, or taking of any 
> action in reliance upon this information,
> by persons or entities other than the intended recipient is prohibited.
> ====================================================================================


 

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to