From c67c8c8192b5bc79ddd5c0504bcf5dcab5ced141 Mon Sep 17 00:00:00 2001 From: Shinpei Muraoka Date: Wed, 30 Mar 2016 10:24:36 +0900 Subject: doc/app/ofctl_rest: Update example of set-field action Signed-off-by: Shinpei Muraoka Signed-off-by: FUJITA Tomonori --- doc/source/app/ofctl_rest.rst | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/source/app/ofctl_rest.rst b/doc/source/app/ofctl_rest.rst index e8c42ddc..c31ad5e2 100644 --- a/doc/source/app/ofctl_rest.rst +++ b/doc/source/app/ofctl_rest.rst @@ -2762,18 +2762,24 @@ Example of set-field action To set VLAN ID to non-VLAN-tagged frame:: - "actions":[ - { - "type": "PUSH_VLAN", # Push a new VLAN tag if a input frame is non-VLAN-tagged - "ethertype": 33024 # Ethertype 0x8100(=33024): IEEE 802.1Q VLAN-tagged frame - }, - { - "type": "SET_FIELD", - "field": "vlan_vid", # Set VLAN ID - "value": 4102 # Describe sum of vlan_id(e.g. 6) | OFPVID_PRESENT(0x1000=4096) + $ curl -X POST -d '{ + "dpid": 1, + "match":{ + "dl_type": "0x8000" }, - { - "type": "OUTPUT", - "port": 2 - } - ] + "actions":[ + { + "type": "PUSH_VLAN", # Push a new VLAN tag if a input frame is non-VLAN-tagged + "ethertype": 33024 # Ethertype 0x8100(=33024): IEEE 802.1Q VLAN-tagged frame + }, + { + "type": "SET_FIELD", + "field": "vlan_vid", # Set VLAN ID + "value": 4102 # Describe sum of vlan_id(e.g. 6) | OFPVID_PRESENT(0x1000=4096) + }, + { + "type": "OUTPUT", + "port": 2 + } + ] + }' http://localhost:8080/stats/flowentry/add -- cgit v1.2.3