backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / action / 25_SET_FIELD / 06_VLAN_VID.json
1 [
2     "action: set_field: 06_VLAN_VID",
3     {
4         "description": "ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
5         "notes":"A value of VLAN_VID (4196) means '100 | OFPVID_PRESENT(0x1000)'.",
6         "notes":"A value of VLAN_VID (4299) means '203 | OFPVID_PRESENT(0x1000)'.",
7         "prerequisite":[
8             {
9                 "OFPFlowMod":{
10                     "table_id":0,
11                     "match":{
12                         "OFPMatch":{
13                             "oxm_fields":[
14                                 {
15                                     "OXMTlv":{
16                                         "field":"vlan_vid",
17                                         "value":4196
18                                     }
19                                 }
20                             ]
21                         }
22                     },
23                     "instructions":[
24                         {
25                             "OFPInstructionActions":{
26                                 "actions":[
27                                     {
28                                         "OFPActionSetField":{
29                                             "field":{
30                                                 "OXMTlv":{
31                                                     "field":"vlan_vid",
32                                                     "value":4299
33                                                 }
34                                             }
35                                         }
36                                     },
37                                     {
38                                         "OFPActionOutput":{
39                                             "port":2
40                                         }
41                                     }
42                                 ],
43                                 "type":4
44                             }
45                         }
46                     ]
47                 }
48             }
49         ],
50         "tests":[
51             {
52                 "ingress":[
53                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
54                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
55                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
56                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
57                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
58                 ],
59                 "egress":[
60                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
61                     "vlan(pcp=3, cfi=0, vid=203, ethertype=2048)",
62                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
63                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
64                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
65                 ]
66             }
67         ]
68     },
69     {
70         "description": "ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
71         "prerequisite":[
72             {
73                 "OFPFlowMod":{
74                     "table_id":0,
75                     "match":{
76                         "OFPMatch":{
77                             "oxm_fields":[
78                                 {
79                                     "OXMTlv":{
80                                         "field":"vlan_vid",
81                                         "value":4196
82                                     }
83                                 }
84                             ]
85                         }
86                     },
87                     "instructions":[
88                         {
89                             "OFPInstructionActions":{
90                                 "actions":[
91                                     {
92                                         "OFPActionSetField":{
93                                             "field":{
94                                                 "OXMTlv":{
95                                                     "field":"vlan_vid",
96                                                     "value":4299
97                                                 }
98                                             }
99                                         }
100                                     },
101                                     {
102                                         "OFPActionOutput":{
103                                             "port":2
104                                         }
105                                     }
106                                 ],
107                                 "type":4
108                             }
109                         }
110                     ]
111                 }
112             }
113         ],
114         "tests":[
115             {
116                 "ingress":[
117                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
118                     "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
119                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
120                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
121                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
122                 ],
123                 "egress":[
124                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
125                     "vlan(pcp=3, cfi=0, vid=203, ethertype=34525)",
126                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
127                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
128                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
129                 ]
130             }
131         ]
132     },
133     {
134         "description": "ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=set_field:203->vlan_vid,output:2'",
135         "prerequisite":[
136             {
137                 "OFPFlowMod":{
138                     "table_id":0,
139                     "match":{
140                         "OFPMatch":{
141                             "oxm_fields":[
142                                 {
143                                     "OXMTlv":{
144                                         "field":"vlan_vid",
145                                         "value":4196
146                                     }
147                                 }
148                             ]
149                         }
150                     },
151                     "instructions":[
152                         {
153                             "OFPInstructionActions":{
154                                 "actions":[
155                                     {
156                                         "OFPActionSetField":{
157                                             "field":{
158                                                 "OXMTlv":{
159                                                     "field":"vlan_vid",
160                                                     "value":4299
161                                                 }
162                                             }
163                                         }
164                                     },
165                                     {
166                                         "OFPActionOutput":{
167                                             "port":2
168                                         }
169                                     }
170                                 ],
171                                 "type":4
172                             }
173                         }
174                     ]
175                 }
176             }
177         ],
178         "tests":[
179             {
180                 "ingress":[
181                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
182                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
183                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
184                     "bytes(b'\\x00' * 30)"
185                 ],
186                 "egress":[
187                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
188                     "vlan(pcp=3, cfi=0, vid=203, ethertype=2054)",
189                     "arp(dst_ip='192.168.20.20',dst_mac='22:22:22:22:22:22', opcode=1, src_ip='192.168.10.10',src_mac='12:11:11:11:11:11')",
190                     "bytes(b'\\x00' * 30)"
191                 ]
192             }
193         ]
194     }
195 ]