(2014年07月22日 02:43), jalee wrote:
> Hi.
> I have question about meter, if I use real openflow switch not OVS, can I
> use meter/qos function in 3.11 version?
> I mean just only load "ofctl_rest.py" module. 

Yes.
I think operation of ofctl_rest that's the same in real openflow switch and OVS.

> If can support real openflow switch can you share sample restful-api to me?

Please see following examples.

FlowMod with the meter instruction:

    flow = {'match': {},
            'actions': [{'type': 'METER',
                         'meter_id': 1}]
    curl -X POST -d '{"dpid": 1, "match": {}, "actions": [{"type": "METER", 
"meter_id": 1}]}' http://localhost:8080/stats/flowentry/add

MeterMod:

    meter = {'meter_id': 1,
             'flags': 'KBPS',
             'bands': [{'type': 'DROP',
                        'rate': 1000}]}
    curl -X POST -d '{"dpid": 1, "meter_id": 1, "flags": "KBPS", "bands": 
[{"type": "DROP", "rate": 1000}]}' http://localhost:8080/stats/meterentry/add

> Thanks,
> 
> 
> Jalee
> 
> 
> 
> 
> ====================================================================================
> 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.
> ====================================================================================
>  
> 
> 
> 
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to