backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / action / 25_SET_FIELD / 11_IPV4_SRC.json
1 [
2     "action: set_field: 11_IPV4_SRC",
3     {
4         "description": "ethernet/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[
12                                 {
13                                     "OXMTlv":{
14                                         "field":"eth_type",
15                                         "value":2048
16                                     }
17                                 },
18                                 {
19                                     "OXMTlv":{
20                                         "field":"ipv4_src",
21                                         "value":"192.168.10.10"
22                                     }
23                                 }
24                             ]
25                         }
26                     },
27                     "instructions":[
28                         {
29                             "OFPInstructionActions":{
30                                 "actions":[
31                                     {
32                                         "OFPActionSetField":{
33                                             "field":{
34                                                 "OXMTlv":{
35                                                     "field":"ipv4_src",
36                                                     "value":"10.10.10.10"
37                                                 }
38                                             }
39                                         }
40                                     },
41                                     {
42                                         "OFPActionOutput":{
43                                             "port":2
44                                         }
45                                     }
46                                 ],
47                                 "type":4
48                             }
49                         }
50                     ]
51                 }
52             }
53         ],
54         "tests":[
55             {
56                 "ingress":[
57                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
58                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
59                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
60                     "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'"
61                 ],
62                 "egress":[
63                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
64                     "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
65                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
66                     "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'"
67                 ]
68             }
69         ]
70     },
71     {
72         "description": "ethernet/vlan/ipv4(src='192.168.10.10')/tcp-->'ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
73         "prerequisite":[
74             {
75                 "OFPFlowMod":{
76                     "table_id":0,
77                     "match":{
78                         "OFPMatch":{
79                             "oxm_fields":[
80                                 {
81                                     "OXMTlv":{
82                                         "field":"eth_type",
83                                         "value":2048
84                                     }
85                                 },
86                                 {
87                                     "OXMTlv":{
88                                         "field":"ipv4_src",
89                                         "value":"192.168.10.10"
90                                     }
91                                 }
92                             ]
93                         }
94                     },
95                     "instructions":[
96                         {
97                             "OFPInstructionActions":{
98                                 "actions":[
99                                     {
100                                         "OFPActionSetField":{
101                                             "field":{
102                                                 "OXMTlv":{
103                                                     "field":"ipv4_src",
104                                                     "value":"10.10.10.10"
105                                                 }
106                                             }
107                                         }
108                                     },
109                                     {
110                                         "OFPActionOutput":{
111                                             "port":2
112                                         }
113                                     }
114                                 ],
115                                 "type":4
116                             }
117                         }
118                     ]
119                 }
120             }
121         ],
122         "tests":[
123             {
124                 "ingress":[
125                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
126                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
127                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
128                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
129                     "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'"
130                 ],
131                 "egress":[
132                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
133                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
134                     "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
135                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
136                     "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'"
137                 ]
138             }
139         ]
140     },
141     {
142         "description": "ethernet/mpls/ipv4(src='192.168.10.10')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
143         "prerequisite":[
144             {
145                 "OFPFlowMod":{
146                     "table_id":0,
147                     "match":{
148                         "OFPMatch":{
149                             "oxm_fields":[
150                                 {
151                                     "OXMTlv":{
152                                         "field":"eth_type",
153                                         "value":34887
154                                     }
155                                 }
156                             ]
157                         }
158                     },
159                     "instructions":[
160                         {
161                             "OFPInstructionActions":{
162                                 "actions":[
163                                     {
164                                         "OFPActionPopMpls":{
165                                             "ethertype":2048
166                                         }
167                                     }
168                                 ],
169                                 "type":4
170                             }
171                         },
172                         {
173                             "OFPInstructionGotoTable":{
174                                 "table_id":1
175                             }
176                         }
177                     ]
178                 }
179             },
180             {
181                 "OFPFlowMod":{
182                     "table_id":1,
183                     "match":{
184                         "OFPMatch":{
185                             "oxm_fields":[
186                                 {
187                                     "OXMTlv":{
188                                         "field":"eth_type",
189                                         "value":2048
190                                     }
191                                 },
192                                 {
193                                     "OXMTlv":{
194                                         "field":"ipv4_src",
195                                         "value":"192.168.10.10"
196                                     }
197                                 }
198                             ]
199                         }
200                     },
201                     "instructions":[
202                         {
203                             "OFPInstructionActions":{
204                                 "actions":[
205                                     {
206                                         "OFPActionSetField":{
207                                             "field":{
208                                                 "OXMTlv":{
209                                                     "field":"ipv4_src",
210                                                     "value":"10.10.10.10"
211                                                 }
212                                             }
213                                         }
214                                     },
215                                     {
216                                         "OFPActionOutput":{
217                                             "port":2
218                                         }
219                                     }
220                                 ],
221                                 "type":4
222                             }
223                         }
224                     ]
225                 }
226             }
227         ],
228         "tests":[
229             {
230                 "ingress":[
231                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
232                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
233                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
234                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
235                     "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'"
236                 ],
237                 "egress":[
238                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
239                     "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
240                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
241                     "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'"
242                 ]
243             }
244         ]
245     },
246     {
247         "description": "ethernet/itag/ethernet/ipv4(src='192.168.10.10')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_src=192.168.10.10,actions=set_field:10.10.10.10->ipv4_src,output:2'",
248         "prerequisite":[
249             {
250                 "OFPFlowMod":{
251                     "table_id":0,
252                     "match":{
253                         "OFPMatch":{
254                             "oxm_fields":[
255                                 {
256                                     "OXMTlv":{
257                                         "field":"eth_type",
258                                         "value":35047
259                                     }
260                                 }
261                             ]
262                         }
263                     },
264                     "instructions":[
265                         {
266                             "OFPInstructionActions":{
267                                 "actions":[
268                                     {
269                                         "OFPActionPopPbb":{}
270                                     }
271                                 ],
272                                 "type":4
273                             }
274                         },
275                         {
276                             "OFPInstructionGotoTable":{
277                                 "table_id":1
278                             }
279                         }
280                     ]
281                 }
282             },
283             {
284                 "OFPFlowMod":{
285                     "table_id":1,
286                     "match":{
287                         "OFPMatch":{
288                             "oxm_fields":[
289                                 {
290                                     "OXMTlv":{
291                                         "field":"eth_type",
292                                         "value":2048
293                                     }
294                                 },
295                                 {
296                                     "OXMTlv":{
297                                         "field":"ipv4_src",
298                                         "value":"192.168.10.10"
299                                     }
300                                 }
301                             ]
302                         }
303                     },
304                     "instructions":[
305                         {
306                             "OFPInstructionActions":{
307                                 "actions":[
308                                     {
309                                         "OFPActionSetField":{
310                                             "field":{
311                                                 "OXMTlv":{
312                                                     "field":"ipv4_src",
313                                                     "value":"10.10.10.10"
314                                                 }
315                                             }
316                                         }
317                                     },
318                                     {
319                                         "OFPActionOutput":{
320                                             "port":2
321                                         }
322                                     }
323                                 ],
324                                 "type":4
325                             }
326                         }
327                     ]
328                 }
329             }
330         ],
331         "tests":[
332             {
333                 "ingress":[
334                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
335                     "itag(sid=100)",
336                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
337                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
338                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
339                     "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'"
340                 ],
341                 "egress":[
342                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
343                     "ipv4(tos=32, proto=6, src='10.10.10.10', dst='192.168.20.20', ttl=64)",
344                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
345                     "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'"
346                 ]
347             }
348         ]
349     }
350 ]