1*910d504bSZhengchao Shao[
2*910d504bSZhengchao Shao    {
3*910d504bSZhengchao Shao        "id": "2029",
4*910d504bSZhengchao Shao        "name": "Add xt action with log-prefix",
5*910d504bSZhengchao Shao        "category": [
6*910d504bSZhengchao Shao            "actions",
7*910d504bSZhengchao Shao            "xt"
8*910d504bSZhengchao Shao        ],
9*910d504bSZhengchao Shao        "setup": [
10*910d504bSZhengchao Shao            [
11*910d504bSZhengchao Shao                "$TC actions flush action xt",
12*910d504bSZhengchao Shao                0,
13*910d504bSZhengchao Shao                1,
14*910d504bSZhengchao Shao                255
15*910d504bSZhengchao Shao            ]
16*910d504bSZhengchao Shao        ],
17*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix PONG index 100",
18*910d504bSZhengchao Shao        "expExitCode": "0",
19*910d504bSZhengchao Shao        "verifyCmd": "$TC action ls action xt",
20*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:.*target  LOG level warning prefix \"PONG\".*index 100 ref",
21*910d504bSZhengchao Shao        "matchCount": "1",
22*910d504bSZhengchao Shao        "teardown": [
23*910d504bSZhengchao Shao            "$TC actions flush action xt"
24*910d504bSZhengchao Shao        ]
25*910d504bSZhengchao Shao    },
26*910d504bSZhengchao Shao    {
27*910d504bSZhengchao Shao        "id": "3562",
28*910d504bSZhengchao Shao        "name": "Replace xt action log-prefix",
29*910d504bSZhengchao Shao        "category": [
30*910d504bSZhengchao Shao            "actions",
31*910d504bSZhengchao Shao            "xt"
32*910d504bSZhengchao Shao        ],
33*910d504bSZhengchao Shao        "setup": [
34*910d504bSZhengchao Shao            [
35*910d504bSZhengchao Shao                "$TC actions flush action xt",
36*910d504bSZhengchao Shao                0,
37*910d504bSZhengchao Shao                1,
38*910d504bSZhengchao Shao                255
39*910d504bSZhengchao Shao            ],
40*910d504bSZhengchao Shao            [
41*910d504bSZhengchao Shao                "$TC action add action xt -j LOG --log-prefix PONG index 1",
42*910d504bSZhengchao Shao                0,
43*910d504bSZhengchao Shao                1,
44*910d504bSZhengchao Shao                255
45*910d504bSZhengchao Shao            ]
46*910d504bSZhengchao Shao        ],
47*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action replace action xt -j LOG --log-prefix WIN index 1",
48*910d504bSZhengchao Shao        "expExitCode": "0",
49*910d504bSZhengchao Shao        "verifyCmd": "$TC action get action xt index 1",
50*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:.*target  LOG level warning prefix \"WIN\".*index 1 ref",
51*910d504bSZhengchao Shao        "matchCount": "1",
52*910d504bSZhengchao Shao        "teardown": [
53*910d504bSZhengchao Shao            "$TC action flush action xt"
54*910d504bSZhengchao Shao        ]
55*910d504bSZhengchao Shao    },
56*910d504bSZhengchao Shao    {
57*910d504bSZhengchao Shao        "id": "8291",
58*910d504bSZhengchao Shao        "name": "Delete xt action with valid index",
59*910d504bSZhengchao Shao        "category": [
60*910d504bSZhengchao Shao            "actions",
61*910d504bSZhengchao Shao            "xt"
62*910d504bSZhengchao Shao        ],
63*910d504bSZhengchao Shao        "setup": [
64*910d504bSZhengchao Shao            [
65*910d504bSZhengchao Shao                "$TC actions flush action xt",
66*910d504bSZhengchao Shao                0,
67*910d504bSZhengchao Shao                1,
68*910d504bSZhengchao Shao                255
69*910d504bSZhengchao Shao            ],
70*910d504bSZhengchao Shao            [
71*910d504bSZhengchao Shao                "$TC action add action xt -j LOG --log-prefix PONG index 1000",
72*910d504bSZhengchao Shao                0,
73*910d504bSZhengchao Shao                1,
74*910d504bSZhengchao Shao                255
75*910d504bSZhengchao Shao            ]
76*910d504bSZhengchao Shao        ],
77*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action delete action xt index 1000",
78*910d504bSZhengchao Shao        "expExitCode": "0",
79*910d504bSZhengchao Shao        "verifyCmd": "$TC action get action xt index 1000",
80*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:.*target  LOG level warning prefix \"PONG\".*index 1000 ref",
81*910d504bSZhengchao Shao        "matchCount": "0",
82*910d504bSZhengchao Shao        "teardown": [
83*910d504bSZhengchao Shao            "$TC action flush action xt"
84*910d504bSZhengchao Shao        ]
85*910d504bSZhengchao Shao    },
86*910d504bSZhengchao Shao    {
87*910d504bSZhengchao Shao        "id": "5169",
88*910d504bSZhengchao Shao        "name": "Delete xt action with invalid index",
89*910d504bSZhengchao Shao        "category": [
90*910d504bSZhengchao Shao            "actions",
91*910d504bSZhengchao Shao            "xt"
92*910d504bSZhengchao Shao        ],
93*910d504bSZhengchao Shao        "setup": [
94*910d504bSZhengchao Shao            [
95*910d504bSZhengchao Shao                "$TC actions flush action xt",
96*910d504bSZhengchao Shao                0,
97*910d504bSZhengchao Shao                1,
98*910d504bSZhengchao Shao                255
99*910d504bSZhengchao Shao            ],
100*910d504bSZhengchao Shao            [
101*910d504bSZhengchao Shao                "$TC action add action xt -j LOG --log-prefix PONG index 1000",
102*910d504bSZhengchao Shao                0,
103*910d504bSZhengchao Shao                1,
104*910d504bSZhengchao Shao                255
105*910d504bSZhengchao Shao            ]
106*910d504bSZhengchao Shao        ],
107*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action delete action xt index 333",
108*910d504bSZhengchao Shao        "expExitCode": "255",
109*910d504bSZhengchao Shao        "verifyCmd": "$TC action get action xt index 1000",
110*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:.*target  LOG level warning prefix \"PONG\".*index 1000 ref",
111*910d504bSZhengchao Shao        "matchCount": "1",
112*910d504bSZhengchao Shao        "teardown": [
113*910d504bSZhengchao Shao            "$TC action flush action xt"
114*910d504bSZhengchao Shao        ]
115*910d504bSZhengchao Shao    },
116*910d504bSZhengchao Shao    {
117*910d504bSZhengchao Shao        "id": "7284",
118*910d504bSZhengchao Shao        "name": "List xt actions",
119*910d504bSZhengchao Shao        "category": [
120*910d504bSZhengchao Shao            "actions",
121*910d504bSZhengchao Shao            "xt"
122*910d504bSZhengchao Shao        ],
123*910d504bSZhengchao Shao        "setup": [
124*910d504bSZhengchao Shao            [
125*910d504bSZhengchao Shao                "$TC action flush action xt",
126*910d504bSZhengchao Shao                0,
127*910d504bSZhengchao Shao                1,
128*910d504bSZhengchao Shao                255
129*910d504bSZhengchao Shao            ],
130*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix PONG index 1001",
131*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix WIN index 1002",
132*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix LOSE index 1003"
133*910d504bSZhengchao Shao        ],
134*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action list action xt",
135*910d504bSZhengchao Shao        "expExitCode": "0",
136*910d504bSZhengchao Shao        "verifyCmd": "$TC action list action xt",
137*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*: tablename:",
138*910d504bSZhengchao Shao        "matchCount": "3",
139*910d504bSZhengchao Shao        "teardown": [
140*910d504bSZhengchao Shao            "$TC actions flush action xt"
141*910d504bSZhengchao Shao        ]
142*910d504bSZhengchao Shao    },
143*910d504bSZhengchao Shao    {
144*910d504bSZhengchao Shao        "id": "5010",
145*910d504bSZhengchao Shao        "name": "Flush xt actions",
146*910d504bSZhengchao Shao        "category": [
147*910d504bSZhengchao Shao            "actions",
148*910d504bSZhengchao Shao            "xt"
149*910d504bSZhengchao Shao        ],
150*910d504bSZhengchao Shao        "setup": [
151*910d504bSZhengchao Shao            [
152*910d504bSZhengchao Shao		"$TC actions flush action xt",
153*910d504bSZhengchao Shao                0,
154*910d504bSZhengchao Shao                1,
155*910d504bSZhengchao Shao                255
156*910d504bSZhengchao Shao            ],
157*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix PONG index 1001",
158*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix WIN index 1002",
159*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix LOSE index 1003"
160*910d504bSZhengchao Shao	],
161*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action flush action xt",
162*910d504bSZhengchao Shao        "expExitCode": "0",
163*910d504bSZhengchao Shao        "verifyCmd": "$TC action list action xt",
164*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*: tablename:",
165*910d504bSZhengchao Shao        "matchCount": "0",
166*910d504bSZhengchao Shao        "teardown": [
167*910d504bSZhengchao Shao            "$TC actions flush action xt"
168*910d504bSZhengchao Shao        ]
169*910d504bSZhengchao Shao    },
170*910d504bSZhengchao Shao    {
171*910d504bSZhengchao Shao        "id": "8437",
172*910d504bSZhengchao Shao        "name": "Add xt action with duplicate index",
173*910d504bSZhengchao Shao        "category": [
174*910d504bSZhengchao Shao            "actions",
175*910d504bSZhengchao Shao            "xt"
176*910d504bSZhengchao Shao        ],
177*910d504bSZhengchao Shao        "setup": [
178*910d504bSZhengchao Shao            [
179*910d504bSZhengchao Shao                "$TC actions flush action xt",
180*910d504bSZhengchao Shao                0,
181*910d504bSZhengchao Shao                1,
182*910d504bSZhengchao Shao                255
183*910d504bSZhengchao Shao            ],
184*910d504bSZhengchao Shao            "$TC action add action xt -j LOG --log-prefix PONG index 101"
185*910d504bSZhengchao Shao        ],
186*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix WIN index 101",
187*910d504bSZhengchao Shao        "expExitCode": "255",
188*910d504bSZhengchao Shao        "verifyCmd": "$TC action get action xt index 101",
189*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:.*target  LOG level warning prefix \"PONG\".*index 101",
190*910d504bSZhengchao Shao        "matchCount": "1",
191*910d504bSZhengchao Shao        "teardown": [
192*910d504bSZhengchao Shao            "$TC action flush action xt"
193*910d504bSZhengchao Shao        ]
194*910d504bSZhengchao Shao    },
195*910d504bSZhengchao Shao    {
196*910d504bSZhengchao Shao        "id": "2837",
197*910d504bSZhengchao Shao        "name": "Add xt action with invalid index",
198*910d504bSZhengchao Shao        "category": [
199*910d504bSZhengchao Shao            "actions",
200*910d504bSZhengchao Shao            "xt"
201*910d504bSZhengchao Shao        ],
202*910d504bSZhengchao Shao        "setup": [
203*910d504bSZhengchao Shao            [
204*910d504bSZhengchao Shao                "$TC actions flush action xt",
205*910d504bSZhengchao Shao                0,
206*910d504bSZhengchao Shao                1,
207*910d504bSZhengchao Shao                255
208*910d504bSZhengchao Shao            ]
209*910d504bSZhengchao Shao        ],
210*910d504bSZhengchao Shao        "cmdUnderTest": "$TC action add action xt -j LOG --log-prefix WIN index 4294967296",
211*910d504bSZhengchao Shao        "expExitCode": "255",
212*910d504bSZhengchao Shao        "verifyCmd": "$TC action ls action xt",
213*910d504bSZhengchao Shao        "matchPattern": "action order [0-9]*:*target  LOG level warning prefix \"WIN\"",
214*910d504bSZhengchao Shao        "matchCount": "0",
215*910d504bSZhengchao Shao        "teardown": [
216*910d504bSZhengchao Shao            "$TC action flush action xt"
217*910d504bSZhengchao Shao        ]
218*910d504bSZhengchao Shao    }
219*910d504bSZhengchao Shao]
220