Hi,

On 2015年09月11日 04:00, Wayne Marsh wrote:
> Hello all,
> 
> I'm having difficulty finding docs on a Ryu equivelant to the following 
> ovs-ofctl command:
> 
> ovs-ofctl -O OpenFlow13 dump-flows NFE cookie=0x8/-1
> 
> The reason I'm looking for a Ryu controller equivalent is the remote nature 
> of the system the command needs to be executed from.
> 
> What I'm trying to do is get the flow entry for a given cookie from a remote 
> system.

I think ofctl_rest.py is what you are looking for.
Example of use is as follows.

1) Run ryu-manager with ofctl_rest app.

 $ ryu-manager ./ryu/app/ofctl_rest.py --verbose

2) Next, execute the following commands to dump flows.(*)

 $ curl -X POST -d '{
       "cookie": 0x8,
       "cookie_mask": 0xffffffffffffffff,
   }' http://localhost:8080/stats/flow/1 | jq .

3) Then, results will be shown as follow.

 { 
   "1": [
     {
       "match": {
         "in_port": 2
       },
       "flags": 1,
        "table_id": 0,
       "duration_sec": 1,
       "priority": 11111,
       "actions": [
         "OUTPUT:456"
       ],
       "idle_timeout": 60,
       "cookie": 8,
       "packet_count": 0,
       "hard_timeout": 60,
       "byte_count": 0,
       "length": 88,
       "duration_nsec": 6.45e+08
     }
   ]
 }

(*) ryu.app.ofctl_rest provides REST APIs for retrieving the switch stats 
and Updating the switch stats. For more information about ofctl_rest.py 
is described following.
http://ryu.readthedocs.org/en/latest/app/ofctl_rest.html#get-flows-stats-filtered-by-fields

thanks,

> 
> 
> ------------------------------------------------------------------------------
> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> Get real-time metrics from all of your servers, apps and tools
> in one place.
> SourceForge users - Click here to start your Free Trial of Datadog now!
> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to