1[
2    {
3        "id": "c826",
4        "name": "Add ctinfo action with default setting",
5        "category": [
6            "actions",
7            "ctinfo"
8        ],
9        "setup": [
10            [
11                "$TC action flush action ctinfo",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC action add action ctinfo index 10",
18        "expExitCode": "0",
19        "verifyCmd": "$TC action get action ctinfo index 10",
20        "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 10 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC action flush action ctinfo"
24        ]
25    },
26    {
27        "id": "0286",
28        "name": "Add ctinfo action with dscp",
29        "category": [
30            "actions",
31            "ctinfo"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action ctinfo",
36                0,
37                1,
38                255
39            ]
40        ],
41        "cmdUnderTest": "$TC action add action ctinfo dscp 0xfc000000 0x01000000 index 100",
42        "expExitCode": "0",
43        "verifyCmd": "$TC action ls action ctinfo",
44        "matchPattern": "action order [0-9]*: ctinfo zone 0 pipe.*index 100 ref.*dscp 0xfc000000 0x01000000",
45        "matchCount": "1",
46        "teardown": [
47            "$TC actions flush action ctinfo"
48        ]
49    },
50    {
51        "id": "4938",
52        "name": "Add ctinfo action with valid cpmark and zone",
53        "category": [
54            "actions",
55            "ctinfo"
56        ],
57        "setup": [
58            [
59                "$TC action flush action ctinfo",
60                0,
61                1,
62                255
63            ]
64        ],
65        "cmdUnderTest": "$TC action add action ctinfo cpmark 0x01000000 zone 1 index 1",
66        "expExitCode": "0",
67        "verifyCmd": "$TC action get action ctinfo index 1",
68        "matchPattern": "action order [0-9]*: ctinfo zone 1 pipe.*index 1 ref.*cpmark 0x01000000",
69        "matchCount": "1",
70        "teardown": [
71            "$TC action flush action ctinfo"
72        ]
73    },
74    {
75        "id": "7593",
76        "name": "Add ctinfo action with drop control",
77        "category": [
78            "actions",
79            "ctinfo"
80        ],
81        "setup": [
82            [
83                "$TC action flush action ctinfo",
84                0,
85                1,
86                255
87            ]
88        ],
89        "cmdUnderTest": "$TC action add action ctinfo drop index 1000",
90        "expExitCode": "0",
91        "verifyCmd": "$TC action ls action ctinfo",
92        "matchPattern": "action order [0-9]*: ctinfo zone 0 drop.*index 1000 ref",
93        "matchCount": "1",
94        "teardown": [
95            "$TC action flush action ctinfo"
96        ]
97    },
98    {
99        "id": "2961",
100        "name": "Replace ctinfo action zone and action control",
101        "category": [
102            "actions",
103            "ctinfo"
104        ],
105        "setup": [
106            [
107                "$TC actions flush action ctinfo",
108                0,
109                1,
110                255
111            ],
112            [
113                "$TC action add action ctinfo zone 1 drop index 1",
114                0,
115                1,
116                255
117            ]
118        ],
119        "cmdUnderTest": "$TC action replace action ctinfo zone 200 pass index 1",
120        "expExitCode": "0",
121        "verifyCmd": "$TC action get action ctinfo index 1",
122        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
123        "matchCount": "1",
124        "teardown": [
125            "$TC action flush action ctinfo"
126        ]
127    },
128    {
129        "id": "e567",
130        "name": "Delete ctinfo action with valid index",
131        "category": [
132            "actions",
133            "ctinfo"
134        ],
135        "setup": [
136            [
137                "$TC actions flush action ctinfo",
138                0,
139                1,
140                255
141            ],
142            [
143                "$TC action add action ctinfo zone 200 pass index 1",
144                0,
145                1,
146                255
147            ]
148        ],
149        "cmdUnderTest": "$TC action delete action ctinfo index 1",
150        "expExitCode": "0",
151        "verifyCmd": "$TC action get action ctinfo index 1",
152        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
153        "matchCount": "0",
154        "teardown": [
155            "$TC action flush action ctinfo"
156        ]
157    },
158    {
159        "id": "6a91",
160        "name": "Delete ctinfo action with invalid index",
161        "category": [
162            "actions",
163            "ctinfo"
164        ],
165        "setup": [
166            [
167                "$TC actions flush action ctinfo",
168                0,
169                1,
170                255
171            ],
172            [
173                "$TC action add action ctinfo zone 200 pass index 1",
174                0,
175                1,
176                255
177            ]
178        ],
179        "cmdUnderTest": "$TC action delete action ctinfo index 333",
180        "expExitCode": "255",
181        "verifyCmd": "$TC action get action ctinfo index 1",
182        "matchPattern": "action order [0-9]*: ctinfo zone 200 pass.*index 1 ref",
183        "matchCount": "1",
184        "teardown": [
185            "$TC action flush action ctinfo"
186        ]
187    },
188    {
189        "id": "5232",
190        "name": "List ctinfo actions",
191        "category": [
192            "actions",
193            "ctinfo"
194        ],
195        "setup": [
196            [
197                "$TC action flush action ctinfo",
198                0,
199                1,
200                255
201            ],
202            "$TC action add action ctinfo zone 20 pass index 101",
203            "$TC action add action ctinfo cpmark 0x02000000 drop index 102",
204            "$TC action add action ctinfo continue index 103"
205        ],
206        "cmdUnderTest": "$TC action list action ctinfo",
207        "expExitCode": "0",
208        "verifyCmd": "$TC action list action ctinfo",
209        "matchPattern": "action order [0-9]*: ctinfo",
210        "matchCount": "3",
211        "teardown": [
212            "$TC actions flush action ctinfo"
213        ]
214    },
215    {
216        "id": "7702",
217        "name": "Flush ctinfo actions",
218        "category": [
219            "actions",
220            "ctinfo"
221        ],
222        "setup": [
223            [
224                "$TC actions flush action ctinfo",
225                0,
226                1,
227                255
228            ],
229	    "$TC action add action ctinfo zone 20 pass index 101",
230            "$TC action add action ctinfo cpmark 0x02000000 drop index 102",
231            "$TC action add action ctinfo continue index 103"
232        ],
233        "cmdUnderTest": "$TC action flush action ctinfo",
234        "expExitCode": "0",
235        "verifyCmd": "$TC action list action ctinfo",
236        "matchPattern": "action order [0-9]*: ctinfo",
237        "matchCount": "0",
238        "teardown": [
239            "$TC actions flush action ctinfo"
240        ]
241    },
242    {
243        "id": "3201",
244        "name": "Add ctinfo action with duplicate index",
245        "category": [
246            "actions",
247            "ctinfo"
248        ],
249        "setup": [
250            [
251                "$TC actions flush action ctinfo",
252                0,
253                1,
254                255
255            ],
256            "$TC action add action ctinfo zone 20 pass index 101"
257        ],
258        "cmdUnderTest": "$TC action add action ctinfo cpmark 0x02000000 drop index 101",
259        "expExitCode": "255",
260        "verifyCmd": "$TC action get action ctinfo index 101",
261        "matchPattern": "action order [0-9]*: ctinfo zone 20 pass.*index 101",
262        "matchCount": "1",
263        "teardown": [
264            "$TC action flush action ctinfo"
265        ]
266    },
267    {
268        "id": "8295",
269        "name": "Add ctinfo action with invalid index",
270        "category": [
271            "actions",
272            "ctinfo"
273        ],
274        "setup": [
275            [
276                "$TC actions flush action ctinfo",
277                0,
278                1,
279                255
280            ]
281        ],
282        "cmdUnderTest": "$TC action add action ctinfo zone 20 index 4294967296",
283        "expExitCode": "255",
284        "verifyCmd": "$TC action ls action ctinfo",
285        "matchPattern": "action order [0-9]*: ctinfo",
286        "matchCount": "0",
287        "teardown": [
288            "$TC action flush action ctinfo"
289        ]
290    },
291    {
292        "id": "3964",
293        "name": "Replace ctinfo action with invalid goto_chain control",
294        "category": [
295            "actions",
296            "ctinfo"
297        ],
298        "setup": [
299            [
300                "$TC actions flush action ctinfo",
301                0,
302                1,
303                255
304            ],
305            "$TC action add action ctinfo pass index 90"
306        ],
307        "cmdUnderTest": "$TC action replace action ctinfo goto chain 42 index 90",
308        "expExitCode": "255",
309        "verifyCmd": "$TC action list action ctinfo",
310        "matchPattern": "action order [0-9]*: ctinfo.*pass.*index 90",
311        "matchCount": "1",
312        "teardown": [
313            "$TC action flush action ctinfo"
314        ]
315    }
316]
317