1[ 2 { 3 "id": "49aa", 4 "name": "Add valid basic police action", 5 "category": [ 6 "actions", 7 "police" 8 ], 9 "setup": [ 10 [ 11 "$TC actions flush action police", 12 0, 13 1, 14 255 15 ] 16 ], 17 "cmdUnderTest": "$TC actions add action police rate 1kbit burst 10k index 1", 18 "expExitCode": "0", 19 "verifyCmd": "$TC actions ls action police", 20 "matchPattern": "action order [0-9]*: police 0x1 rate 1Kbit burst 10Kb", 21 "matchCount": "1", 22 "teardown": [ 23 "$TC actions flush action police" 24 ] 25 }, 26 { 27 "id": "3abe", 28 "name": "Add police action with duplicate index", 29 "category": [ 30 "actions", 31 "police" 32 ], 33 "setup": [ 34 [ 35 "$TC actions flush action police", 36 0, 37 1, 38 255 39 ], 40 "$TC actions add action police rate 4Mbit burst 120k index 9" 41 ], 42 "cmdUnderTest": "$TC actions add action police rate 8kbit burst 24k index 9", 43 "expExitCode": "255", 44 "verifyCmd": "$TC actions ls action police", 45 "matchPattern": "action order [0-9]*: police 0x9", 46 "matchCount": "1", 47 "teardown": [ 48 "$TC actions flush action police" 49 ] 50 }, 51 { 52 "id": "49fa", 53 "name": "Add valid police action with mtu", 54 "category": [ 55 "actions", 56 "police" 57 ], 58 "setup": [ 59 [ 60 "$TC actions flush action police", 61 0, 62 1, 63 255 64 ] 65 ], 66 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 1k index 98", 67 "expExitCode": "0", 68 "verifyCmd": "$TC actions get action police index 98", 69 "matchPattern": "action order [0-9]*: police 0x62 rate 90Kbit burst 10Kb mtu 1Kb", 70 "matchCount": "1", 71 "teardown": [ 72 "$TC actions flush action police" 73 ] 74 }, 75 { 76 "id": "7943", 77 "name": "Add valid police action with peakrate", 78 "category": [ 79 "actions", 80 "police" 81 ], 82 "setup": [ 83 [ 84 "$TC actions flush action police", 85 0, 86 1, 87 255 88 ] 89 ], 90 "cmdUnderTest": "$TC actions add action police rate 90kbit burst 10k mtu 2kb peakrate 100kbit index 3", 91 "expExitCode": "0", 92 "verifyCmd": "$TC actions ls action police", 93 "matchPattern": "action order [0-9]*: police 0x3 rate 90Kbit burst 10Kb mtu 2Kb peakrate 100Kbit", 94 "matchCount": "1", 95 "teardown": [ 96 "$TC actions flush action police" 97 ] 98 }, 99 { 100 "id": "055e", 101 "name": "Add police action with peakrate and no mtu", 102 "category": [ 103 "actions", 104 "police" 105 ], 106 "setup": [ 107 [ 108 "$TC actions flush action police", 109 0, 110 1, 111 255 112 ] 113 ], 114 "cmdUnderTest": "$TC actions add action police rate 5kbit burst 6kb peakrate 10kbit index 9", 115 "expExitCode": "255", 116 "verifyCmd": "$TC actions ls action police", 117 "matchPattern": "action order [0-9]*: police 0x9 rate 5Kb burst 10Kb", 118 "matchCount": "0", 119 "teardown": [ 120 "$TC actions flush action police" 121 ] 122 }, 123 { 124 "id": "f057", 125 "name": "Add police action with valid overhead", 126 "category": [ 127 "actions", 128 "police" 129 ], 130 "setup": [ 131 [ 132 "$TC actions flush action police", 133 0, 134 1, 135 255 136 ] 137 ], 138 "cmdUnderTest": "$TC actions add action police rate 1mbit burst 100k overhead 64 index 64", 139 "expExitCode": "0", 140 "verifyCmd": "$TC actions get action police index 64", 141 "matchPattern": "action order [0-9]*: police 0x40 rate 1Mbit burst 100Kb mtu 2Kb action reclassify overhead 64b", 142 "matchCount": "1", 143 "teardown": [ 144 "$TC actions flush action police" 145 ] 146 }, 147 { 148 "id": "7ffb", 149 "name": "Add police action with ethernet linklayer type", 150 "category": [ 151 "actions", 152 "police" 153 ], 154 "setup": [ 155 [ 156 "$TC actions flush action police", 157 0, 158 1, 159 255 160 ] 161 ], 162 "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer ethernet index 8", 163 "expExitCode": "0", 164 "verifyCmd": "$TC actions show action police", 165 "matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b", 166 "matchCount": "1", 167 "teardown": [ 168 "$TC actions flush action police" 169 ] 170 }, 171 { 172 "id": "3dda", 173 "name": "Add police action with atm linklayer type", 174 "category": [ 175 "actions", 176 "police" 177 ], 178 "setup": [ 179 [ 180 "$TC actions flush action police", 181 0, 182 1, 183 255 184 ] 185 ], 186 "cmdUnderTest": "$TC actions add action police rate 2mbit burst 200k linklayer atm index 8", 187 "expExitCode": "0", 188 "verifyCmd": "$TC actions show action police", 189 "matchPattern": "action order [0-9]*: police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b linklayer atm", 190 "matchCount": "1", 191 "teardown": [ 192 "$TC actions flush action police" 193 ] 194 }, 195 { 196 "id": "551b", 197 "name": "Add police actions with conform-exceed control continue/drop", 198 "category": [ 199 "actions", 200 "police" 201 ], 202 "setup": [ 203 [ 204 "$TC actions flush action police", 205 0, 206 1, 207 255 208 ] 209 ], 210 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed continue/drop index 1", 211 "expExitCode": "0", 212 "verifyCmd": "$TC actions get action police index 1", 213 "matchPattern": "action order [0-9]*: police 0x1 rate 3Mbit burst 250Kb mtu 2Kb action continue/drop", 214 "matchCount": "1", 215 "teardown": [ 216 "$TC actions flush action police" 217 ] 218 }, 219 { 220 "id": "0c70", 221 "name": "Add police actions with conform-exceed control pass/reclassify", 222 "category": [ 223 "actions", 224 "police" 225 ], 226 "setup": [ 227 [ 228 "$TC actions flush action police", 229 0, 230 1, 231 255 232 ] 233 ], 234 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/reclassify index 4", 235 "expExitCode": "0", 236 "verifyCmd": "$TC actions ls action police", 237 "matchPattern": "action order [0-9]*: police 0x4 rate 3Mbit burst 250Kb mtu 2Kb action pass/reclassify", 238 "matchCount": "1", 239 "teardown": [ 240 "$TC actions flush action police" 241 ] 242 }, 243 { 244 "id": "d946", 245 "name": "Add police actions with conform-exceed control pass/pipe", 246 "category": [ 247 "actions", 248 "police" 249 ], 250 "setup": [ 251 [ 252 "$TC actions flush action police", 253 0, 254 1, 255 255 256 ] 257 ], 258 "cmdUnderTest": "$TC actions add action police rate 3mbit burst 250k conform-exceed pass/pipe index 5", 259 "expExitCode": "0", 260 "verifyCmd": "$TC actions ls action police", 261 "matchPattern": "action order [0-9]*: police 0x5 rate 3Mbit burst 250Kb mtu 2Kb action pass/pipe", 262 "matchCount": "1", 263 "teardown": [ 264 "$TC actions flush action police" 265 ] 266 }, 267 { 268 "id": "336e", 269 "name": "Delete police action", 270 "category": [ 271 "actions", 272 "police" 273 ], 274 "setup": [ 275 [ 276 "$TC actions flush action police", 277 0, 278 1, 279 255 280 ], 281 "$TC actions add action police rate 5mbit burst 2m index 12" 282 ], 283 "cmdUnderTest": "$TC actions delete action police index 12", 284 "expExitCode": "0", 285 "verifyCmd": "$TC actions ls action police", 286 "matchPattern": "action order [0-9]*: police 0xc rate 5Mb burst 2Mb", 287 "matchCount": "0", 288 "teardown": [ 289 "$TC actions flush action police" 290 ] 291 }, 292 { 293 "id": "77fa", 294 "name": "Get single police action from many actions", 295 "category": [ 296 "actions", 297 "police" 298 ], 299 "setup": [ 300 [ 301 "$TC actions flush action police", 302 0, 303 1, 304 255 305 ], 306 "$TC actions add action police rate 1mbit burst 100k index 1", 307 "$TC actions add action police rate 2mbit burst 200k index 2", 308 "$TC actions add action police rate 3mbit burst 300k index 3", 309 "$TC actions add action police rate 4mbit burst 400k index 4", 310 "$TC actions add action police rate 5mbit burst 500k index 5", 311 "$TC actions add action police rate 6mbit burst 600k index 6", 312 "$TC actions add action police rate 7mbit burst 700k index 7", 313 "$TC actions add action police rate 8mbit burst 800k index 8" 314 ], 315 "cmdUnderTest": "$TC actions get action police index 4", 316 "expExitCode": "0", 317 "verifyCmd": "$TC actions get action police index 4", 318 "matchPattern": "action order [0-9]*: police 0x4 rate 4Mbit burst 400Kb", 319 "matchCount": "1", 320 "teardown": [ 321 "$TC actions flush action police" 322 ] 323 }, 324 { 325 "id": "aa43", 326 "name": "Get single police action without specifying index", 327 "category": [ 328 "actions", 329 "police" 330 ], 331 "setup": [ 332 [ 333 "$TC actions flush action police", 334 0, 335 1, 336 255 337 ], 338 "$TC actions add action police rate 1mbit burst 100k index 1" 339 ], 340 "cmdUnderTest": "$TC actions get action police", 341 "expExitCode": "255", 342 "verifyCmd": "$TC actions get action police", 343 "matchPattern": "action order [0-9]*: police", 344 "matchCount": "0", 345 "teardown": [ 346 "$TC actions flush action police" 347 ] 348 }, 349 { 350 "id": "858b", 351 "name": "List police actions", 352 "category": [ 353 "actions", 354 "police" 355 ], 356 "setup": [ 357 [ 358 "$TC actions flush action police", 359 0, 360 1, 361 255 362 ], 363 "$TC actions add action police rate 1mbit burst 100k index 1", 364 "$TC actions add action police rate 2mbit burst 200k index 2", 365 "$TC actions add action police rate 3mbit burst 300k index 3", 366 "$TC actions add action police rate 4mbit burst 400k index 4", 367 "$TC actions add action police rate 5mbit burst 500k index 5", 368 "$TC actions add action police rate 6mbit burst 600k index 6", 369 "$TC actions add action police rate 7mbit burst 700k index 7", 370 "$TC actions add action police rate 8mbit burst 800k index 8" 371 ], 372 "cmdUnderTest": "$TC actions list action police", 373 "expExitCode": "0", 374 "verifyCmd": "$TC actions ls action police", 375 "matchPattern": "action order [0-9]*: police 0x[1-8] rate [1-8]Mbit burst [1-8]00Kb", 376 "matchCount": "8", 377 "teardown": [ 378 "$TC actions flush action police" 379 ] 380 }, 381 { 382 "id": "1c3a", 383 "name": "Flush police actions", 384 "category": [ 385 "actions", 386 "police" 387 ], 388 "setup": [ 389 "$TC actions add action police rate 1mbit burst 100k index 1", 390 "$TC actions add action police rate 2mbit burst 200k index 2", 391 "$TC actions add action police rate 3mbit burst 300k index 3", 392 "$TC actions add action police rate 4mbit burst 400k index 4", 393 "$TC actions add action police rate 5mbit burst 500k index 5", 394 "$TC actions add action police rate 6mbit burst 600k index 6", 395 "$TC actions add action police rate 7mbit burst 700k index 7", 396 "$TC actions add action police rate 8mbit burst 800k index 8" 397 ], 398 "cmdUnderTest": "$TC actions flush action police", 399 "expExitCode": "0", 400 "verifyCmd": "$TC actions ls action police", 401 "matchPattern": "action order [0-9]*: police", 402 "matchCount": "0", 403 "teardown": [ 404 "" 405 ] 406 }, 407 { 408 "id": "7326", 409 "name": "Add police action with control continue", 410 "category": [ 411 "actions", 412 "police" 413 ], 414 "setup": [ 415 [ 416 "$TC actions flush action police", 417 0, 418 1, 419 255 420 ] 421 ], 422 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m continue index 1", 423 "expExitCode": "0", 424 "verifyCmd": "$TC actions get action police index 1", 425 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action continue", 426 "matchCount": "1", 427 "teardown": [ 428 "$TC actions flush action police" 429 ] 430 }, 431 { 432 "id": "34fa", 433 "name": "Add police action with control drop", 434 "category": [ 435 "actions", 436 "police" 437 ], 438 "setup": [ 439 [ 440 "$TC actions flush action police", 441 0, 442 1, 443 255 444 ] 445 ], 446 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m drop index 1", 447 "expExitCode": "0", 448 "verifyCmd": "$TC actions ls action police", 449 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action drop", 450 "matchCount": "1", 451 "teardown": [ 452 "$TC actions flush action police" 453 ] 454 }, 455 { 456 "id": "8dd5", 457 "name": "Add police action with control ok", 458 "category": [ 459 "actions", 460 "police" 461 ], 462 "setup": [ 463 [ 464 "$TC actions flush action police", 465 0, 466 1, 467 255 468 ] 469 ], 470 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m ok index 1", 471 "expExitCode": "0", 472 "verifyCmd": "$TC actions ls action police", 473 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pass", 474 "matchCount": "1", 475 "teardown": [ 476 "$TC actions flush action police" 477 ] 478 }, 479 { 480 "id": "b9d1", 481 "name": "Add police action with control reclassify", 482 "category": [ 483 "actions", 484 "police" 485 ], 486 "setup": [ 487 [ 488 "$TC actions flush action police", 489 0, 490 1, 491 255 492 ] 493 ], 494 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m reclassify index 1", 495 "expExitCode": "0", 496 "verifyCmd": "$TC actions get action police index 1", 497 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action reclassify", 498 "matchCount": "1", 499 "teardown": [ 500 "$TC actions flush action police" 501 ] 502 }, 503 { 504 "id": "c534", 505 "name": "Add police action with control pipe", 506 "category": [ 507 "actions", 508 "police" 509 ], 510 "setup": [ 511 [ 512 "$TC actions flush action police", 513 0, 514 1, 515 255 516 ] 517 ], 518 "cmdUnderTest": "$TC actions add action police rate 7mbit burst 1m pipe index 1", 519 "expExitCode": "0", 520 "verifyCmd": "$TC actions ls action police", 521 "matchPattern": "action order [0-9]*: police 0x1 rate 7Mbit burst 1024Kb mtu 2Kb action pipe", 522 "matchCount": "1", 523 "teardown": [ 524 "$TC actions flush action police" 525 ] 526 } 527] 528