backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / match / 02_METADATA.json
1 [
2     "match: 02_METADATA",
3     {
4         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[]
12                         }
13                     },
14                     "instructions":[
15                         {
16                             "OFPInstructionWriteMetadata":{
17                                 "metadata":255,
18                                 "metadata_mask":4294967295
19                             }
20                         },
21                         {
22                             "OFPInstructionGotoTable":{
23                                 "table_id":1
24                             }
25                         }
26                     ]
27                 }
28             },
29             {
30                 "OFPFlowMod":{
31                     "table_id":1,
32                     "match":{
33                         "OFPMatch":{
34                             "oxm_fields":[
35                                 {
36                                     "OXMTlv":{
37                                         "field":"metadata",
38                                         "value":255
39                                     }
40                                 }
41                             ]
42                         }
43                     },
44                     "instructions":[
45                         {
46                             "OFPInstructionActions":{
47                                 "actions":[
48                                     {
49                                         "OFPActionOutput":{
50                                             "port":2
51                                         }
52                                     }
53                                 ],
54                                 "type":4
55                             }
56                         }
57                     ]
58                 }
59             }
60         ],
61         "tests":[
62             {
63                 "ingress":[
64                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
65                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
66                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
67                     "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'"
68                 ],
69                 "egress":[
70                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
71                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
72                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
73                     "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'"
74                 ]
75             }
76         ]
77     },
78     {
79         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:CONTROLLER'",
80         "prerequisite":[
81             {
82                 "OFPFlowMod":{
83                     "table_id":0,
84                     "match":{
85                         "OFPMatch":{
86                             "oxm_fields":[]
87                         }
88                     },
89                     "instructions":[
90                         {
91                             "OFPInstructionWriteMetadata":{
92                                 "metadata":255,
93                                 "metadata_mask":4294967295
94                             }
95                         },
96                         {
97                             "OFPInstructionGotoTable":{
98                                 "table_id":1
99                             }
100                         }
101                     ]
102                 }
103             },
104             {
105                 "OFPFlowMod":{
106                     "table_id":1,
107                     "match":{
108                         "OFPMatch":{
109                             "oxm_fields":[
110                                 {
111                                     "OXMTlv":{
112                                         "field":"metadata",
113                                         "value":255
114                                     }
115                                 }
116                             ]
117                         }
118                     },
119                     "instructions":[
120                         {
121                             "OFPInstructionActions":{
122                                 "actions":[
123                                     {
124                                         "OFPActionOutput":{
125                                             "max_len":65535,
126                                             "port":4294967293
127                                         }
128                                     }
129                                 ],
130                                 "type":4
131                             }
132                         }
133                     ]
134                 }
135             }
136         ],
137         "tests":[
138             {
139                 "ingress":[
140                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
141                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
142                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
143                     "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'"
144                 ],
145                 "PACKET_IN":[
146                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
147                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
148                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
149                     "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'"
150                 ]
151             }
152         ]
153     },
154     {
155         "description":"ethernet/ipv4/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
156         "prerequisite":[
157             {
158                 "OFPFlowMod":{
159                     "table_id":0,
160                     "match":{
161                         "OFPMatch":{
162                             "oxm_fields":[]
163                         }
164                     },
165                     "instructions":[
166                         {
167                             "OFPInstructionWriteMetadata":{
168                                 "metadata":155,
169                                 "metadata_mask":4294967295
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":"metadata",
189                                         "value":255
190                                     }
191                                 }
192                             ]
193                         }
194                     },
195                     "instructions":[
196                         {
197                             "OFPInstructionActions":{
198                                 "actions":[
199                                     {
200                                         "OFPActionOutput":{
201                                             "port":2
202                                         }
203                                     }
204                                 ],
205                                 "type":4
206                             }
207                         }
208                     ]
209                 }
210             }
211         ],
212         "tests":[
213             {
214                 "ingress":[
215                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
216                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
217                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
218                     "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'"
219                 ],
220                 "table-miss":[
221                     1
222                 ]
223             }
224         ]
225     },
226     {
227         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
228         "prerequisite":[
229             {
230                 "OFPFlowMod":{
231                     "table_id":0,
232                     "match":{
233                         "OFPMatch":{
234                             "oxm_fields":[]
235                         }
236                     },
237                     "instructions":[
238                         {
239                             "OFPInstructionWriteMetadata":{
240                                 "metadata":255,
241                                 "metadata_mask":4294967295
242                             }
243                         },
244                         {
245                             "OFPInstructionGotoTable":{
246                                 "table_id":1
247                             }
248                         }
249                     ]
250                 }
251             },
252             {
253                 "OFPFlowMod":{
254                     "table_id":1,
255                     "match":{
256                         "OFPMatch":{
257                             "oxm_fields":[
258                                 {
259                                     "OXMTlv":{
260                                         "field":"metadata",
261                                         "value":255
262                                     }
263                                 }
264                             ]
265                         }
266                     },
267                     "instructions":[
268                         {
269                             "OFPInstructionActions":{
270                                 "actions":[
271                                     {
272                                         "OFPActionOutput":{
273                                             "port":2
274                                         }
275                                     }
276                                 ],
277                                 "type":4
278                             }
279                         }
280                     ]
281                 }
282             }
283         ],
284         "tests":[
285             {
286                 "ingress":[
287                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
288                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
289                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
290                     "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'"
291                 ],
292                 "egress":[
293                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
294                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
295                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
296                     "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'"
297                 ]
298             }
299         ]
300     },
301     {
302         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id=1,metadata=255,actions=output:CONTROLLER'",
303         "prerequisite":[
304             {
305                 "OFPFlowMod":{
306                     "table_id":0,
307                     "match":{
308                         "OFPMatch":{
309                             "oxm_fields":[]
310                         }
311                     },
312                     "instructions":[
313                         {
314                             "OFPInstructionWriteMetadata":{
315                                 "metadata":255,
316                                 "metadata_mask":4294967295
317                             }
318                         },
319                         {
320                             "OFPInstructionGotoTable":{
321                                 "table_id":1
322                             }
323                         }
324                     ]
325                 }
326             },
327             {
328                 "OFPFlowMod":{
329                     "table_id":1,
330                     "match":{
331                         "OFPMatch":{
332                             "oxm_fields":[
333                                 {
334                                     "OXMTlv":{
335                                         "field":"metadata",
336                                         "value":255
337                                     }
338                                 }
339                             ]
340                         }
341                     },
342                     "instructions":[
343                         {
344                             "OFPInstructionActions":{
345                                 "actions":[
346                                     {
347                                         "OFPActionOutput":{
348                                             "max_len":65535,
349                                             "port":4294967293
350                                         }
351                                     }
352                                 ],
353                                 "type":4
354                             }
355                         }
356                     ]
357                 }
358             }
359         ],
360         "tests":[
361             {
362                 "ingress":[
363                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
364                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
365                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
366                     "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'"
367                 ],
368                 "PACKET_IN":[
369                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34525)",
370                     "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
371                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
372                     "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'"
373                 ]
374             }
375         ]
376     },
377     {
378         "description":"ethernet/ipv6/tcp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
379         "prerequisite":[
380             {
381                 "OFPFlowMod":{
382                     "table_id":0,
383                     "match":{
384                         "OFPMatch":{
385                             "oxm_fields":[]
386                         }
387                     },
388                     "instructions":[
389                         {
390                             "OFPInstructionWriteMetadata":{
391                                 "metadata":155,
392                                 "metadata_mask":4294967295
393                             }
394                         },
395                         {
396                             "OFPInstructionGotoTable":{
397                                 "table_id":1
398                             }
399                         }
400                     ]
401                 }
402             },
403             {
404                 "OFPFlowMod":{
405                     "table_id":1,
406                     "match":{
407                         "OFPMatch":{
408                             "oxm_fields":[
409                                 {
410                                     "OXMTlv":{
411                                         "field":"metadata",
412                                         "value":255
413                                     }
414                                 }
415                             ]
416                         }
417                     },
418                     "instructions":[
419                         {
420                             "OFPInstructionActions":{
421                                 "actions":[
422                                     {
423                                         "OFPActionOutput":{
424                                             "port":2
425                                         }
426                                     }
427                                 ],
428                                 "type":4
429                             }
430                         }
431                     ]
432                 }
433             }
434         ],
435         "tests":[
436             {
437                 "ingress":[
438                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34525)",
439                     "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)",
440                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
441                     "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'"
442                 ],
443                 "table-miss":[
444                     1
445                 ]
446             }
447         ]
448     },
449     {
450         "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
451         "prerequisite":[
452             {
453                 "OFPFlowMod":{
454                     "table_id":0,
455                     "match":{
456                         "OFPMatch":{
457                             "oxm_fields":[]
458                         }
459                     },
460                     "instructions":[
461                         {
462                             "OFPInstructionWriteMetadata":{
463                                 "metadata":255,
464                                 "metadata_mask":4294967295
465                             }
466                         },
467                         {
468                             "OFPInstructionGotoTable":{
469                                 "table_id":1
470                             }
471                         }
472                     ]
473                 }
474             },
475             {
476                 "OFPFlowMod":{
477                     "table_id":1,
478                     "match":{
479                         "OFPMatch":{
480                             "oxm_fields":[
481                                 {
482                                     "OXMTlv":{
483                                         "field":"metadata",
484                                         "value":255
485                                     }
486                                 }
487                             ]
488                         }
489                     },
490                     "instructions":[
491                         {
492                             "OFPInstructionActions":{
493                                 "actions":[
494                                     {
495                                         "OFPActionOutput":{
496                                             "port":2
497                                         }
498                                     }
499                                 ],
500                                 "type":4
501                             }
502                         }
503                     ]
504                 }
505             }
506         ],
507         "tests":[
508             {
509                 "ingress":[
510                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
511                     "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')",
512                     "bytes(b'\\x00' * (60 - 42))"
513                 ],
514                 "egress":[
515                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
516                     "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')",
517                     "bytes(b'\\x00' * (60 - 42))"
518                 ]
519             }
520         ]
521     },
522     {
523         "description":"ethernet/arp-->'actions=write_metadata:255/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:CONTROLLER'",
524         "prerequisite":[
525             {
526                 "OFPFlowMod":{
527                     "table_id":0,
528                     "match":{
529                         "OFPMatch":{
530                             "oxm_fields":[]
531                         }
532                     },
533                     "instructions":[
534                         {
535                             "OFPInstructionWriteMetadata":{
536                                 "metadata":255,
537                                 "metadata_mask":4294967295
538                             }
539                         },
540                         {
541                             "OFPInstructionGotoTable":{
542                                 "table_id":1
543                             }
544                         }
545                     ]
546                 }
547             },
548             {
549                 "OFPFlowMod":{
550                     "table_id":1,
551                     "match":{
552                         "OFPMatch":{
553                             "oxm_fields":[
554                                 {
555                                     "OXMTlv":{
556                                         "field":"metadata",
557                                         "value":255
558                                     }
559                                 }
560                             ]
561                         }
562                     },
563                     "instructions":[
564                         {
565                             "OFPInstructionActions":{
566                                 "actions":[
567                                     {
568                                         "OFPActionOutput":{
569                                             "max_len":65535,
570                                             "port":4294967293
571                                         }
572                                     }
573                                 ],
574                                 "type":4
575                             }
576                         }
577                     ]
578                 }
579             }
580         ],
581         "tests":[
582             {
583                 "ingress":[
584                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
585                     "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')",
586                     "bytes(b'\\x00' * (60 - 42))"
587                 ],
588                 "PACKET_IN":[
589                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2054)",
590                     "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')",
591                     "bytes(b'\\x00' * (60 - 42))"
592                 ]
593             }
594         ]
595     },
596     {
597         "description":"ethernet/arp-->'actions=write_metadata:155/0xffffffff,goto_table:1','table_id:1,metadata=255,actions=output:2'",
598         "prerequisite":[
599             {
600                 "OFPFlowMod":{
601                     "table_id":0,
602                     "match":{
603                         "OFPMatch":{
604                             "oxm_fields":[]
605                         }
606                     },
607                     "instructions":[
608                         {
609                             "OFPInstructionWriteMetadata":{
610                                 "metadata":155,
611                                 "metadata_mask":4294967295
612                             }
613                         },
614                         {
615                             "OFPInstructionGotoTable":{
616                                 "table_id":1
617                             }
618                         }
619                     ]
620                 }
621             },
622             {
623                 "OFPFlowMod":{
624                     "table_id":1,
625                     "match":{
626                         "OFPMatch":{
627                             "oxm_fields":[
628                                 {
629                                     "OXMTlv":{
630                                         "field":"metadata",
631                                         "value":255
632                                     }
633                                 }
634                             ]
635                         }
636                     },
637                     "instructions":[
638                         {
639                             "OFPInstructionActions":{
640                                 "actions":[
641                                     {
642                                         "OFPActionOutput":{
643                                             "port":2
644                                         }
645                                     }
646                                 ],
647                                 "type":4
648                             }
649                         }
650                     ]
651                 }
652             }
653         ],
654         "tests":[
655             {
656                 "ingress":[
657                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2054)",
658                     "arp(dst_ip='10.10.20.20',dst_mac='ba:bb:bb:bb:bb:bb', opcode=2, src_ip='10.10.10.10',src_mac='aa:aa:aa:aa:aa:aa')",
659                     "bytes(b'\\x00' * (60 - 42))"
660                 ],
661                 "table-miss":[
662                     1
663                 ]
664             }
665         ]
666     }
667 ]