hi.
the interface of ofctl_rest treats instructions and actions similarly.
please try this:
curl -X POST -d '{"dpid": 1,
"match": {"in_port": 9900,
"dl_vlan": 100},
"actions": [{"type": "METER", "meter_id": 1},
{"type": "OUTPUT", "port": 7001}]}'
http://localhost:8080/stats/flowentry/add
thanks.
On Mon, 3 Feb 2014 15:13:55 -0500
Wei Liao <[email protected]> wrote:
(2014年02月04日 05:13), Wei Liao wrote:
> Hi Tomonori-san,
>
> I am happy that I saw item 1 and 2 in R3.5. But after download the R3.5
> and do some test. I found following problem, I need some clarifications
> on that.
>
> In flow_mod command if I specify instructions with meter, meter_id
>
> curl -X POST http://localhost:8080/stats/flowentry/add -d
> '{"dpid":"1","match":{"in_port":9900,"dl_vlan":100},"instructions":[{"type":"meter",
>
> "meter_id":1},{"type":"apply", "actions":[{"type":"OUTPUT","port":7001}]}]}'
>
> user@user-VirtualBox:lib$ curl http://localhost:8080/stats/flow/1
> {"1": [{"actions": [], "idle_timeout": 0, "cookie": 0, "packet_count": 0,
> "hard_timeout": 0, "byte_count": 0, "duration_nsec": 716000, "priority": 0,
> "duration_sec": 10, "table_id": 0, "match": {"dl_vlan": 100, "in_port":
> 9900}}]}
>
> user@user-VirtualBox:lib$ curl http://localhost:8080/stats/meterconfig/1
>
> {"1": [{"bands": [{"burst_size": 0, "rate": 1000, "type": "DROP"}], "flags":
> "KBPS", "meter_id": 1}, {"bands": [{"burst_size": 0, "rate": 1000, "type":
> "DROP"}], "flags": "KBPS", "meter_id": 2}]}user@user-VirtualBox:lib$
>
> The R3.4 supports the instructions array, I don't know why R3.5 only take
> take actions instead of instructions.
> I saw json of mod_flow about instructions under tests directory, I could not
> find out how to associate meter to
> a flow.
>
> Thanks and Regards
>
> Wei Liao
>
>
> -----Original Message-----
> From: FUJITA Tomonori
> Sent: Tuesday, December 17, 2013 6:13 AM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Ryu-devel] RYU controller enhancements required
>
> Hi,
>
> On Fri, 13 Dec 2013 11:55:16 -0500
> "Wei Liao" <[email protected]> wrote:
>
>> 1. Is there any plan to submit METER related REST API in ofctl_rest.py
>> 2. Is there any plan to submit metadata supporting in ofctl_v1_3.py for
>> FLOW_MOD instruction and match
>> 3. REST API to handle upstream Async. events (PortStatusReport,
>> FlowRemoved,
>> PacketIn and notify up layer application.
>
> I could work on the first two items however the last one is
> tricky. You need to use async html stuff. That's why I use RPC for
> some of our projects.
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel