1[
2    {
3        "id": "6f5a",
4        "name": "Add vlan pop action",
5        "category": [
6            "actions",
7            "vlan"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action vlan",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action vlan pop index 8",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions list action vlan",
20        "matchPattern": "action order [0-9]+: vlan.*pop.*index 8 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action vlan"
24        ]
25    },
26    {
27        "id": "ee6f",
28        "name": "Add vlan pop action with large index",
29        "category": [
30            "actions",
31            "vlan"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action vlan",
36                0,
37                1,
38                255
39            ]
40        ],
41        "cmdUnderTest": "$TC actions add action vlan pop index 4294967295",
42        "expExitCode": "0",
43        "verifyCmd": "$TC actions list action vlan",
44        "matchPattern": "action order [0-9]+: vlan.*pop.*index 4294967295 ref",
45        "matchCount": "1",
46        "teardown": [
47            "$TC actions flush action vlan"
48        ]
49    },
50    {
51        "id": "b6b9",
52        "name": "Add vlan pop action with jump opcode",
53        "category": [
54            "actions",
55            "vlan"
56        ],
57        "setup": [
58            [
59                "$TC actions flush action vlan",
60                0,
61                1,
62                255
63            ]
64        ],
65        "cmdUnderTest": "$TC actions add action vlan pop jump 10 index 8",
66        "expExitCode": "0",
67        "verifyCmd": "$TC actions list action vlan",
68        "matchPattern": "action order [0-9]+: vlan.*jump 10.*index 8 ref",
69        "matchCount": "1",
70        "teardown": [
71            "$TC actions flush action vlan"
72        ]
73    },
74    {
75        "id": "87c3",
76        "name": "Add vlan pop action with trap opcode",
77        "category": [
78            "actions",
79            "vlan"
80        ],
81        "setup": [
82            [
83                "$TC actions flush action vlan",
84                0,
85                1,
86                255
87            ]
88        ],
89        "cmdUnderTest": "$TC actions add action vlan pop trap index 8",
90        "expExitCode": "0",
91        "verifyCmd": "$TC actions list action vlan",
92        "matchPattern": "action order [0-9]+: vlan.*pop trap.*index 8 ref",
93        "matchCount": "1",
94        "teardown": [
95            "$TC actions flush action vlan"
96        ]
97    },
98    {
99        "id": "2b91",
100        "name": "Add vlan invalid action",
101        "category": [
102            "actions",
103            "vlan"
104        ],
105        "setup": [
106            [
107                "$TC actions flush action vlan",
108                0,
109                1,
110                255
111            ]
112        ],
113        "cmdUnderTest": "$TC actions add action vlan bad_mode",
114        "expExitCode": "255",
115        "verifyCmd": "$TC actions list action vlan",
116        "matchPattern": "action order [0-9]+: vlan.*bad_mode",
117        "matchCount": "0",
118        "teardown": [
119            "$TC actions flush action vlan"
120        ]
121    },
122    {
123        "id": "57fc",
124        "name": "Add vlan action with invalid protocol type",
125        "category": [
126            "actions",
127            "vlan"
128        ],
129        "setup": [
130            [
131                "$TC actions flush action vlan",
132                0,
133                1,
134                255
135            ]
136        ],
137        "cmdUnderTest": "$TC actions add action vlan push protocol ABCD",
138        "expExitCode": "255",
139        "verifyCmd": "$TC actions list action vlan",
140        "matchPattern": "action order [0-9]+: vlan.*push",
141        "matchCount": "0",
142        "teardown": [
143            "$TC actions flush action vlan"
144        ]
145    },
146    {
147        "id": "3989",
148        "name": "Add vlan push action with default protocol and priority",
149        "category": [
150            "actions",
151            "vlan"
152        ],
153        "setup": [
154            [
155                "$TC actions flush action vlan",
156                0,
157                1,
158                255
159            ]
160        ],
161        "cmdUnderTest": "$TC actions add action vlan push id 123 index 18",
162        "expExitCode": "0",
163        "verifyCmd": "$TC actions get action vlan index 18",
164        "matchPattern": "action order [0-9]+: vlan.*push id 123 protocol 802.1Q priority 0 pipe.*index 18 ref",
165        "matchCount": "1",
166        "teardown": [
167            "$TC actions flush action vlan"
168        ]
169    },
170    {
171        "id": "79dc",
172        "name": "Add vlan push action with protocol 802.1Q and priority 3",
173        "category": [
174            "actions",
175            "vlan"
176        ],
177        "setup": [
178            [
179                "$TC actions flush action vlan",
180                0,
181                1,
182                255
183            ]
184        ],
185        "cmdUnderTest": "$TC actions add action vlan push id 77 protocol 802.1Q priority 3 continue index 734",
186        "expExitCode": "0",
187        "verifyCmd": "$TC actions get action vlan index 734",
188        "matchPattern": "action order [0-9]+: vlan.*push id 77 protocol 802.1Q priority 3 continue.*index 734 ref",
189        "matchCount": "1",
190        "teardown": [
191            "$TC actions flush action vlan"
192        ]
193    },
194    {
195        "id": "4d73",
196        "name": "Add vlan push action with protocol 802.1AD",
197        "category": [
198            "actions",
199            "vlan"
200        ],
201        "setup": [
202            [
203                "$TC actions flush action vlan",
204                0,
205                1,
206                255
207            ]
208        ],
209        "cmdUnderTest": "$TC actions add action vlan push id 1024 protocol 802.1AD pass index 10000",
210        "expExitCode": "0",
211        "verifyCmd": "$TC actions get action vlan index 10000",
212        "matchPattern": "action order [0-9]+: vlan.*push id 1024 protocol 802.1ad priority 0 pass.*index 10000 ref",
213        "matchCount": "1",
214        "teardown": [
215            "$TC actions flush action vlan"
216        ]
217    },
218    {
219        "id": "1f7b",
220        "name": "Add vlan push action with invalid vlan ID",
221        "category": [
222            "actions",
223            "vlan"
224        ],
225        "setup": [
226            [
227                "$TC actions flush action vlan",
228                0,
229                1,
230                255
231            ]
232        ],
233        "cmdUnderTest": "$TC actions add action vlan push id 5678 index 1",
234        "expExitCode": "255",
235        "verifyCmd": "$TC actions list action vlan",
236        "matchPattern": "action order [0-9]+: vlan.*push id 5678.*index 1 ref",
237        "matchCount": "0",
238        "teardown": [
239            "$TC actions flush action vlan"
240        ]
241    },
242    {
243        "id": "5d02",
244        "name": "Add vlan push action with invalid IEEE 802.1p priority",
245        "category": [
246            "actions",
247            "vlan"
248        ],
249        "setup": [
250            [
251                "$TC actions flush action vlan",
252                0,
253                1,
254                255
255            ]
256        ],
257        "cmdUnderTest": "$TC actions add action vlan push id 5 priority 10 index 1",
258        "expExitCode": "255",
259        "verifyCmd": "$TC actions list action vlan",
260        "matchPattern": "action order [0-9]+: vlan.*push id 5.*index 1 ref",
261        "matchCount": "0",
262        "teardown": [
263            "$TC actions flush action vlan"
264        ]
265    },
266    {
267        "id": "6812",
268        "name": "Add vlan modify action for protocol 802.1Q",
269        "category": [
270            "actions",
271            "vlan"
272        ],
273        "setup": [
274            [
275                "$TC actions flush action vlan",
276                0,
277                1,
278                255
279            ]
280        ],
281        "cmdUnderTest": "$TC actions add action vlan modify protocol 802.1Q id 5 index 100",
282        "expExitCode": "0",
283        "verifyCmd": "$TC actions get action vlan index 100",
284        "matchPattern": "action order [0-9]+: vlan.*modify id 100 protocol 802.1Q priority 0 pipe.*index 100 ref",
285        "matchCount": "0",
286        "teardown": [
287            "$TC actions flush action vlan"
288        ]
289    },
290    {
291        "id": "5a31",
292        "name": "Add vlan modify action for protocol 802.1AD",
293        "category": [
294            "actions",
295            "vlan"
296        ],
297        "setup": [
298            [
299                "$TC actions flush action vlan",
300                0,
301                1,
302                255
303            ]
304        ],
305        "cmdUnderTest": "$TC actions add action vlan modify protocol 802.1ad id 500 reclassify index 12",
306        "expExitCode": "0",
307        "verifyCmd": "$TC actions get action vlan index 12",
308        "matchPattern": "action order [0-9]+: vlan.*modify id 500 protocol 802.1ad priority 0 reclassify.*index 12 ref",
309        "matchCount": "1",
310        "teardown": [
311            "$TC actions flush action vlan"
312        ]
313    },
314    {
315        "id": "83a4",
316        "name": "Delete vlan pop action",
317        "category": [
318            "actions",
319            "vlan"
320        ],
321        "setup": [
322            [
323                "$TC actions flush action vlan",
324                0,
325                1,
326                255
327            ],
328            "$TC actions add action vlan pop index 44"
329        ],
330        "cmdUnderTest": "$TC actions del action vlan index 44",
331        "expExitCode": "0",
332        "verifyCmd": "$TC actions list action vlan",
333        "matchPattern": "action order [0-9]+: vlan.*pop.*index 44 ref",
334        "matchCount": "0",
335        "teardown": []
336    },
337    {
338        "id": "ed1e",
339        "name": "Delete vlan push action for protocol 802.1Q",
340        "category": [
341            "actions",
342            "vlan"
343        ],
344        "setup": [
345            [
346                "$TC actions flush action vlan",
347                0,
348                1,
349                255
350            ],
351            "$TC actions add action vlan push id 4094 protocol 802.1Q index 999"
352        ],
353        "cmdUnderTest": "$TC actions del action vlan index 999",
354        "expExitCode": "0",
355        "verifyCmd": "$TC actions list action vlan",
356        "matchPattern": "action order [0-9]+: vlan.*push id 4094 protocol 802.1Q priority 0 pipe.*index 999 ref",
357        "matchCount": "0",
358        "teardown": []
359    },
360    {
361        "id": "a2a3",
362        "name": "Flush vlan actions",
363        "category": [
364            "actions",
365            "vlan"
366        ],
367        "setup": [
368            [
369                "$TC actions flush action vlan",
370                0,
371                1,
372                255
373            ],
374            "$TC actions add action vlan push id 4 protocol 802.1ad index 10",
375            "$TC actions add action vlan push id 4 protocol 802.1ad index 11",
376            "$TC actions add action vlan push id 4 protocol 802.1ad index 12",
377            "$TC actions add action vlan push id 4 protocol 802.1ad index 13"
378        ],
379        "cmdUnderTest": "$TC actions flush action vlan",
380        "expExitCode": "0",
381        "verifyCmd": "$TC actions list action vlan",
382        "matchPattern": "action order [0-9]+: vlan.*push id 4 protocol 802.1ad",
383        "matchCount": "0",
384        "teardown": []
385    },
386    {
387        "id": "1d78",
388        "name": "Add vlan action with cookie",
389        "category": [
390            "actions",
391            "vlan"
392        ],
393        "setup": [
394            [
395                "$TC actions flush action vlan",
396                0,
397                1,
398                255
399            ]
400        ],
401        "cmdUnderTest": "$TC actions add action vlan push id 4 cookie a0a0a0a0a0a0a0",
402        "expExitCode": "0",
403        "verifyCmd": "$TC actions list action vlan",
404        "matchPattern": "action order [0-9]+: vlan.*push id 4.*cookie a0a0a0a0a0a0a0",
405        "matchCount": "1",
406        "teardown": [
407            "$TC actions flush action vlan"
408        ]
409    }
410]
411