~ubuntu-branches/ubuntu/wily/ryu/wily-proposed

« back to all changes in this revision

Viewing changes to ryu/tests/switch/of14/match/06_VLAN_VID.json

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski
  • Date: 2014-08-18 16:58:52 UTC
  • Revision ID: package-import@ubuntu.com-20140818165852-i0qck3g5mw7rtxt0
Tags: upstream-3.12
ImportĀ upstreamĀ versionĀ 3.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[
 
2
    "match: 06_VLAN_VID",
 
3
    {
 
4
        "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=output:2'",
 
5
        "prerequisite":[
 
6
            {
 
7
                "OFPFlowMod":{
 
8
                    "table_id":0,
 
9
                    "match":{
 
10
                        "OFPMatch":{
 
11
                            "oxm_fields":[
 
12
                                {
 
13
                                    "OXMTlv":{
 
14
                                        "field":"vlan_vid",
 
15
                                        "value":4196
 
16
                                    }
 
17
                                }
 
18
                            ]
 
19
                        }
 
20
                    },
 
21
                    "instructions":[
 
22
                        {
 
23
                            "OFPInstructionActions":{
 
24
                                "actions":[
 
25
                                    {
 
26
                                        "OFPActionOutput":{
 
27
                                            "port":2
 
28
                                        }
 
29
                                    }
 
30
                                ],
 
31
                                "type":4
 
32
                            }
 
33
                        }
 
34
                    ]
 
35
                }
 
36
            }
 
37
        ],
 
38
        "tests":[
 
39
            {
 
40
                "ingress":[
 
41
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
42
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
 
43
                    "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
 
44
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
45
                    "'\\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'"
 
46
                ],
 
47
                "egress":[
 
48
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
49
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
 
50
                    "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
 
51
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
52
                    "'\\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'"
 
53
                ]
 
54
            }
 
55
        ]
 
56
    },
 
57
    {
 
58
        "description":"ethernet/vlan(vid=100)/ipv4/tcp-->'vlan_vid=100,actions=output:CONTROLLER'",
 
59
        "prerequisite":[
 
60
            {
 
61
                "OFPFlowMod":{
 
62
                    "table_id":0,
 
63
                    "match":{
 
64
                        "OFPMatch":{
 
65
                            "oxm_fields":[
 
66
                                {
 
67
                                    "OXMTlv":{
 
68
                                        "field":"vlan_vid",
 
69
                                        "value":4196
 
70
                                    }
 
71
                                }
 
72
                            ]
 
73
                        }
 
74
                    },
 
75
                    "instructions":[
 
76
                        {
 
77
                            "OFPInstructionActions":{
 
78
                                "actions":[
 
79
                                    {
 
80
                                        "OFPActionOutput":{
 
81
                                            "max_len":65535,
 
82
                                            "port":4294967293
 
83
                                        }
 
84
                                    }
 
85
                                ],
 
86
                                "type":4
 
87
                            }
 
88
                        }
 
89
                    ]
 
90
                }
 
91
            }
 
92
        ],
 
93
        "tests":[
 
94
            {
 
95
                "ingress":[
 
96
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
97
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
 
98
                    "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
 
99
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
100
                    "'\\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'"
 
101
                ],
 
102
                "PACKET_IN":[
 
103
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
104
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
 
105
                    "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
 
106
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
107
                    "'\\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'"
 
108
                ]
 
109
            }
 
110
        ]
 
111
    },
 
112
    {
 
113
        "description":"ethernet/vlan(vid=203)/ipv4/tcp-->'vlan_vid=100,actions=output:2'",
 
114
        "prerequisite":[
 
115
            {
 
116
                "OFPFlowMod":{
 
117
                    "table_id":0,
 
118
                    "match":{
 
119
                        "OFPMatch":{
 
120
                            "oxm_fields":[
 
121
                                {
 
122
                                    "OXMTlv":{
 
123
                                        "field":"vlan_vid",
 
124
                                        "value":4196
 
125
                                    }
 
126
                                }
 
127
                            ]
 
128
                        }
 
129
                    },
 
130
                    "instructions":[
 
131
                        {
 
132
                            "OFPInstructionActions":{
 
133
                                "actions":[
 
134
                                    {
 
135
                                        "OFPActionOutput":{
 
136
                                            "port":2
 
137
                                        }
 
138
                                    }
 
139
                                ],
 
140
                                "type":4
 
141
                            }
 
142
                        }
 
143
                    ]
 
144
                }
 
145
            }
 
146
        ],
 
147
        "tests":[
 
148
            {
 
149
                "ingress":[
 
150
                    "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
 
151
                    "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)",
 
152
                    "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
 
153
                    "tcp(dst_port=6789, option=str('\\x01' * 4), src_port=12345)",
 
154
                    "'\\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'"
 
155
                ],
 
156
                "table-miss":[
 
157
                    0
 
158
                ]
 
159
            }
 
160
        ]
 
161
    },
 
162
    {
 
163
        "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=output:2'",
 
164
        "prerequisite":[
 
165
            {
 
166
                "OFPFlowMod":{
 
167
                    "table_id":0,
 
168
                    "match":{
 
169
                        "OFPMatch":{
 
170
                            "oxm_fields":[
 
171
                                {
 
172
                                    "OXMTlv":{
 
173
                                        "field":"vlan_vid",
 
174
                                        "value":4196
 
175
                                    }
 
176
                                }
 
177
                            ]
 
178
                        }
 
179
                    },
 
180
                    "instructions":[
 
181
                        {
 
182
                            "OFPInstructionActions":{
 
183
                                "actions":[
 
184
                                    {
 
185
                                        "OFPActionOutput":{
 
186
                                            "port":2
 
187
                                        }
 
188
                                    }
 
189
                                ],
 
190
                                "type":4
 
191
                            }
 
192
                        }
 
193
                    ]
 
194
                }
 
195
            }
 
196
        ],
 
197
        "tests":[
 
198
            {
 
199
                "ingress":[
 
200
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
201
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
 
202
                    "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
 
203
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
204
                    "'\\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'"
 
205
                ],
 
206
                "egress":[
 
207
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
208
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
 
209
                    "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
 
210
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
211
                    "'\\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'"
 
212
                ]
 
213
            }
 
214
        ]
 
215
    },
 
216
    {
 
217
        "description":"ethernet/vlan(vid=100)/ipv6/tcp-->'vlan_vid=100,actions=output:CONTROLLER'",
 
218
        "prerequisite":[
 
219
            {
 
220
                "OFPFlowMod":{
 
221
                    "table_id":0,
 
222
                    "match":{
 
223
                        "OFPMatch":{
 
224
                            "oxm_fields":[
 
225
                                {
 
226
                                    "OXMTlv":{
 
227
                                        "field":"vlan_vid",
 
228
                                        "value":4196
 
229
                                    }
 
230
                                }
 
231
                            ]
 
232
                        }
 
233
                    },
 
234
                    "instructions":[
 
235
                        {
 
236
                            "OFPInstructionActions":{
 
237
                                "actions":[
 
238
                                    {
 
239
                                        "OFPActionOutput":{
 
240
                                            "max_len":65535,
 
241
                                            "port":4294967293
 
242
                                        }
 
243
                                    }
 
244
                                ],
 
245
                                "type":4
 
246
                            }
 
247
                        }
 
248
                    ]
 
249
                }
 
250
            }
 
251
        ],
 
252
        "tests":[
 
253
            {
 
254
                "ingress":[
 
255
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
256
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
 
257
                    "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
 
258
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
259
                    "'\\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'"
 
260
                ],
 
261
                "PACKET_IN":[
 
262
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
263
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=34525)",
 
264
                    "ipv6(dst='20::20', flow_label=100, src='10::10', nxt=6, hop_limit=64, traffic_class=32)",
 
265
                    "tcp(dst_port=2222, option=str('\\x00' * 4), src_port=11111)",
 
266
                    "'\\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'"
 
267
                ]
 
268
            }
 
269
        ]
 
270
    },
 
271
    {
 
272
        "description":"ethernet/vlan(vid=203)/ipv6/tcp-->'vlan_vid=100,actions=output:2'",
 
273
        "prerequisite":[
 
274
            {
 
275
                "OFPFlowMod":{
 
276
                    "table_id":0,
 
277
                    "match":{
 
278
                        "OFPMatch":{
 
279
                            "oxm_fields":[
 
280
                                {
 
281
                                    "OXMTlv":{
 
282
                                        "field":"vlan_vid",
 
283
                                        "value":4196
 
284
                                    }
 
285
                                }
 
286
                            ]
 
287
                        }
 
288
                    },
 
289
                    "instructions":[
 
290
                        {
 
291
                            "OFPInstructionActions":{
 
292
                                "actions":[
 
293
                                    {
 
294
                                        "OFPActionOutput":{
 
295
                                            "port":2
 
296
                                        }
 
297
                                    }
 
298
                                ],
 
299
                                "type":4
 
300
                            }
 
301
                        }
 
302
                    ]
 
303
                }
 
304
            }
 
305
        ],
 
306
        "tests":[
 
307
            {
 
308
                "ingress":[
 
309
                    "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
 
310
                    "vlan(pcp=5, cfi=0, vid=203, ethertype=34525)",
 
311
                    "ipv6(dst='b0::b0', flow_label=203, src='a0::a0', nxt=6, hop_limit=127, traffic_class=65)",
 
312
                    "tcp(dst_port=6789, option=str('\\x01' * 4), src_port=12345)",
 
313
                    "'\\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'"
 
314
                ],
 
315
                "table-miss":[
 
316
                    0
 
317
                ]
 
318
            }
 
319
        ]
 
320
    },
 
321
    {
 
322
        "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=output:2'",
 
323
        "prerequisite":[
 
324
            {
 
325
                "OFPFlowMod":{
 
326
                    "table_id":0,
 
327
                    "match":{
 
328
                        "OFPMatch":{
 
329
                            "oxm_fields":[
 
330
                                {
 
331
                                    "OXMTlv":{
 
332
                                        "field":"vlan_vid",
 
333
                                        "value":4196
 
334
                                    }
 
335
                                }
 
336
                            ]
 
337
                        }
 
338
                    },
 
339
                    "instructions":[
 
340
                        {
 
341
                            "OFPInstructionActions":{
 
342
                                "actions":[
 
343
                                    {
 
344
                                        "OFPActionOutput":{
 
345
                                            "port":2
 
346
                                        }
 
347
                                    }
 
348
                                ],
 
349
                                "type":4
 
350
                            }
 
351
                        }
 
352
                    ]
 
353
                }
 
354
            }
 
355
        ],
 
356
        "tests":[
 
357
            {
 
358
                "ingress":[
 
359
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
360
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
 
361
                    "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')",
 
362
                    "str('\\x00' * 30)"
 
363
                ],
 
364
                "egress":[
 
365
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
366
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
 
367
                    "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')",
 
368
                    "str('\\x00' * 30)"
 
369
                ]
 
370
            }
 
371
        ]
 
372
    },
 
373
    {
 
374
        "description":"ethernet/vlan(vid=100)/arp-->'vlan_vid=100,actions=output:CONTROLLER'",
 
375
        "prerequisite":[
 
376
            {
 
377
                "OFPFlowMod":{
 
378
                    "table_id":0,
 
379
                    "match":{
 
380
                        "OFPMatch":{
 
381
                            "oxm_fields":[
 
382
                                {
 
383
                                    "OXMTlv":{
 
384
                                        "field":"vlan_vid",
 
385
                                        "value":4196
 
386
                                    }
 
387
                                }
 
388
                            ]
 
389
                        }
 
390
                    },
 
391
                    "instructions":[
 
392
                        {
 
393
                            "OFPInstructionActions":{
 
394
                                "actions":[
 
395
                                    {
 
396
                                        "OFPActionOutput":{
 
397
                                            "max_len":65535,
 
398
                                            "port":4294967293
 
399
                                        }
 
400
                                    }
 
401
                                ],
 
402
                                "type":4
 
403
                            }
 
404
                        }
 
405
                    ]
 
406
                }
 
407
            }
 
408
        ],
 
409
        "tests":[
 
410
            {
 
411
                "ingress":[
 
412
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
413
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
 
414
                    "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')",
 
415
                    "str('\\x00' * 30)"
 
416
                ],
 
417
                "PACKET_IN":[
 
418
                    "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
 
419
                    "vlan(pcp=3, cfi=0, vid=100, ethertype=2054)",
 
420
                    "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')",
 
421
                    "str('\\x00' * 30)"
 
422
                ]
 
423
            }
 
424
        ]
 
425
    },
 
426
    {
 
427
        "description":"ethernet/vlan(vid=203)/arp-->'vlan_vid=100,actions=output:2'",
 
428
        "prerequisite":[
 
429
            {
 
430
                "OFPFlowMod":{
 
431
                    "table_id":0,
 
432
                    "match":{
 
433
                        "OFPMatch":{
 
434
                            "oxm_fields":[
 
435
                                {
 
436
                                    "OXMTlv":{
 
437
                                        "field":"vlan_vid",
 
438
                                        "value":4196
 
439
                                    }
 
440
                                }
 
441
                            ]
 
442
                        }
 
443
                    },
 
444
                    "instructions":[
 
445
                        {
 
446
                            "OFPInstructionActions":{
 
447
                                "actions":[
 
448
                                    {
 
449
                                        "OFPActionOutput":{
 
450
                                            "port":2
 
451
                                        }
 
452
                                    }
 
453
                                ],
 
454
                                "type":4
 
455
                            }
 
456
                        }
 
457
                    ]
 
458
                }
 
459
            }
 
460
        ],
 
461
        "tests":[
 
462
            {
 
463
                "ingress":[
 
464
                    "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
 
465
                    "vlan(pcp=5, cfi=0, vid=203, ethertype=2054)",
 
466
                    "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')",
 
467
                    "str('\\x00' * 30)"
 
468
                ],
 
469
                "table-miss":[
 
470
                    0
 
471
                ]
 
472
            }
 
473
        ]
 
474
    }
 
475
]