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