summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorShinpei Muraoka <shinpei.muraoka@gmail.com>2016-03-30 10:24:36 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-04-02 13:12:52 +0900
commitc67c8c8192b5bc79ddd5c0504bcf5dcab5ced141 (patch)
tree970e68d9d1dde6c2a04dfc4242cf74ee5fe2096a /doc
parentefb830c081be8f019b0951feaccd4e51bfadd962 (diff)
doc/app/ofctl_rest: Update example of set-field action
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'doc')
-rw-r--r--doc/source/app/ofctl_rest.rst34
1 files changed, 20 insertions, 14 deletions
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