tunnel_key.json 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129
  1. [
  2. {
  3. "id": "2b11",
  4. "name": "Add tunnel_key set action with mandatory parameters",
  5. "category": [
  6. "actions",
  7. "tunnel_key"
  8. ],
  9. "plugins": {
  10. "requires": "nsPlugin"
  11. },
  12. "setup": [
  13. [
  14. "$TC actions flush action tunnel_key",
  15. 0,
  16. 1,
  17. 255
  18. ]
  19. ],
  20. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1",
  21. "expExitCode": "0",
  22. "verifyCmd": "$TC actions list action tunnel_key",
  23. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1",
  24. "matchCount": "1",
  25. "teardown": [
  26. "$TC actions flush action tunnel_key"
  27. ]
  28. },
  29. {
  30. "id": "dc6b",
  31. "name": "Add tunnel_key set action with missing mandatory src_ip parameter",
  32. "category": [
  33. "actions",
  34. "tunnel_key"
  35. ],
  36. "plugins": {
  37. "requires": "nsPlugin"
  38. },
  39. "setup": [
  40. [
  41. "$TC actions flush action tunnel_key",
  42. 0,
  43. 1,
  44. 255
  45. ]
  46. ],
  47. "cmdUnderTest": "$TC actions add action tunnel_key set dst_ip 20.20.20.2 id 100",
  48. "expExitCode": "255",
  49. "verifyCmd": "$TC actions list action tunnel_key",
  50. "matchPattern": "action order [0-9]+: tunnel_key set.*dst_ip 20.20.20.2.*key_id 100",
  51. "matchCount": "0",
  52. "teardown": [
  53. [
  54. "$TC actions flush action tunnel_key",
  55. 0,
  56. 1,
  57. 255
  58. ]
  59. ]
  60. },
  61. {
  62. "id": "7f25",
  63. "name": "Add tunnel_key set action with missing mandatory dst_ip parameter",
  64. "category": [
  65. "actions",
  66. "tunnel_key"
  67. ],
  68. "plugins": {
  69. "requires": "nsPlugin"
  70. },
  71. "setup": [
  72. [
  73. "$TC actions flush action tunnel_key",
  74. 0,
  75. 1,
  76. 255
  77. ]
  78. ],
  79. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 id 100",
  80. "expExitCode": "255",
  81. "verifyCmd": "$TC actions list action tunnel_key",
  82. "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 10.10.10.1.*key_id 100",
  83. "matchCount": "0",
  84. "teardown": [
  85. [
  86. "$TC actions flush action tunnel_key",
  87. 0,
  88. 1,
  89. 255
  90. ]
  91. ]
  92. },
  93. {
  94. "id": "a5e0",
  95. "name": "Add tunnel_key set action with invalid src_ip parameter",
  96. "category": [
  97. "actions",
  98. "tunnel_key"
  99. ],
  100. "plugins": {
  101. "requires": "nsPlugin"
  102. },
  103. "setup": [
  104. [
  105. "$TC actions flush action tunnel_key",
  106. 0,
  107. 1,
  108. 255
  109. ]
  110. ],
  111. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 300.168.100.1 dst_ip 192.168.200.1 id 7 index 1",
  112. "expExitCode": "1",
  113. "verifyCmd": "$TC actions get action tunnel_key index 1",
  114. "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 300.168.100.1.*dst_ip 192.168.200.1.*key_id 7.*index 1 ref",
  115. "matchCount": "0",
  116. "teardown": [
  117. [
  118. "$TC actions flush action tunnel_key",
  119. 0,
  120. 1,
  121. 255
  122. ]
  123. ]
  124. },
  125. {
  126. "id": "eaa8",
  127. "name": "Add tunnel_key set action with invalid dst_ip parameter",
  128. "category": [
  129. "actions",
  130. "tunnel_key"
  131. ],
  132. "plugins": {
  133. "requires": "nsPlugin"
  134. },
  135. "setup": [
  136. [
  137. "$TC actions flush action tunnel_key",
  138. 0,
  139. 1,
  140. 255
  141. ]
  142. ],
  143. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.100.1 dst_ip 192.168.800.1 id 10 index 11",
  144. "expExitCode": "1",
  145. "verifyCmd": "$TC actions get action tunnel_key index 11",
  146. "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 192.168.100.1.*dst_ip 192.168.800.1.*key_id 10.*index 11 ref",
  147. "matchCount": "0",
  148. "teardown": [
  149. [
  150. "$TC actions flush action tunnel_key",
  151. 0,
  152. 1,
  153. 255
  154. ]
  155. ]
  156. },
  157. {
  158. "id": "3b09",
  159. "name": "Add tunnel_key set action with invalid id parameter",
  160. "category": [
  161. "actions",
  162. "tunnel_key"
  163. ],
  164. "plugins": {
  165. "requires": "nsPlugin"
  166. },
  167. "setup": [
  168. [
  169. "$TC actions flush action tunnel_key",
  170. 0,
  171. 1,
  172. 255
  173. ]
  174. ],
  175. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 112233445566778899 index 1",
  176. "expExitCode": "255",
  177. "verifyCmd": "$TC actions get action tunnel_key index 1",
  178. "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 112233445566778899.*index 1 ref",
  179. "matchCount": "0",
  180. "teardown": [
  181. [
  182. "$TC actions flush action tunnel_key",
  183. 0,
  184. 1,
  185. 255
  186. ]
  187. ]
  188. },
  189. {
  190. "id": "9625",
  191. "name": "Add tunnel_key set action with invalid dst_port parameter",
  192. "category": [
  193. "actions",
  194. "tunnel_key"
  195. ],
  196. "plugins": {
  197. "requires": "nsPlugin"
  198. },
  199. "setup": [
  200. [
  201. "$TC actions flush action tunnel_key",
  202. 0,
  203. 1,
  204. 255
  205. ]
  206. ],
  207. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 dst_port 998877 index 1",
  208. "expExitCode": "255",
  209. "verifyCmd": "$TC actions get action tunnel_key index 1",
  210. "matchPattern": "action order [0-9]+: tunnel_key set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 11.*dst_port 998877.*index 1 ref",
  211. "matchCount": "0",
  212. "teardown": [
  213. [
  214. "$TC actions flush action tunnel_key",
  215. 0,
  216. 1,
  217. 255
  218. ]
  219. ]
  220. },
  221. {
  222. "id": "05af",
  223. "name": "Add tunnel_key set action with optional dst_port parameter",
  224. "category": [
  225. "actions",
  226. "tunnel_key"
  227. ],
  228. "plugins": {
  229. "requires": "nsPlugin"
  230. },
  231. "setup": [
  232. [
  233. "$TC actions flush action tunnel_key",
  234. 0,
  235. 1,
  236. 255
  237. ]
  238. ],
  239. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.100.1 dst_ip 192.168.200.1 id 789 dst_port 4000 index 10",
  240. "expExitCode": "0",
  241. "verifyCmd": "$TC actions get action tunnel_key index 10",
  242. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.100.1.*dst_ip 192.168.200.1.*key_id 789.*dst_port 4000.*index 10 ref",
  243. "matchCount": "1",
  244. "teardown": [
  245. "$TC actions flush action tunnel_key"
  246. ]
  247. },
  248. {
  249. "id": "da80",
  250. "name": "Add tunnel_key set action with index at 32-bit maximum",
  251. "category": [
  252. "actions",
  253. "tunnel_key"
  254. ],
  255. "plugins": {
  256. "requires": "nsPlugin"
  257. },
  258. "setup": [
  259. [
  260. "$TC actions flush action tunnel_key",
  261. 0,
  262. 1,
  263. 255
  264. ]
  265. ],
  266. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 index 4294967295",
  267. "expExitCode": "0",
  268. "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
  269. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*id 11.*index 4294967295 ref",
  270. "matchCount": "1",
  271. "teardown": [
  272. "$TC actions flush action tunnel_key"
  273. ]
  274. },
  275. {
  276. "id": "d407",
  277. "name": "Add tunnel_key set action with index exceeding 32-bit maximum",
  278. "category": [
  279. "actions",
  280. "tunnel_key"
  281. ],
  282. "plugins": {
  283. "requires": "nsPlugin"
  284. },
  285. "setup": [
  286. [
  287. "$TC actions flush action tunnel_key",
  288. 0,
  289. 1,
  290. 255
  291. ]
  292. ],
  293. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 11 index 4294967295678",
  294. "expExitCode": "255",
  295. "verifyCmd": "$TC actions get action tunnel_key index 4294967295678",
  296. "matchPattern": "action order [0-9]+: tunnel_key set.*index 4294967295678 ref",
  297. "matchCount": "0",
  298. "teardown": [
  299. [
  300. "$TC actions flush action tunnel_key",
  301. 0,
  302. 1,
  303. 255
  304. ]
  305. ]
  306. },
  307. {
  308. "id": "5cba",
  309. "name": "Add tunnel_key set action with id value at 32-bit maximum",
  310. "category": [
  311. "actions",
  312. "tunnel_key"
  313. ],
  314. "plugins": {
  315. "requires": "nsPlugin"
  316. },
  317. "setup": [
  318. [
  319. "$TC actions flush action tunnel_key",
  320. 0,
  321. 1,
  322. 255
  323. ]
  324. ],
  325. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 4294967295 index 1",
  326. "expExitCode": "0",
  327. "verifyCmd": "$TC actions get action tunnel_key index 1",
  328. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 4294967295.*index 1",
  329. "matchCount": "1",
  330. "teardown": [
  331. "$TC actions flush action tunnel_key"
  332. ]
  333. },
  334. {
  335. "id": "e84a",
  336. "name": "Add tunnel_key set action with id value exceeding 32-bit maximum",
  337. "category": [
  338. "actions",
  339. "tunnel_key"
  340. ],
  341. "plugins": {
  342. "requires": "nsPlugin"
  343. },
  344. "setup": [
  345. [
  346. "$TC actions flush action tunnel_key",
  347. 0,
  348. 1,
  349. 255
  350. ]
  351. ],
  352. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42949672955 index 1",
  353. "expExitCode": "255",
  354. "verifyCmd": "$TC actions get action tunnel_key index 4294967295",
  355. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42949672955.*index 1",
  356. "matchCount": "0",
  357. "teardown": [
  358. [
  359. "$TC actions flush action tunnel_key",
  360. 0,
  361. 1,
  362. 255
  363. ]
  364. ]
  365. },
  366. {
  367. "id": "9c19",
  368. "name": "Add tunnel_key set action with dst_port value at 16-bit maximum",
  369. "category": [
  370. "actions",
  371. "tunnel_key"
  372. ],
  373. "plugins": {
  374. "requires": "nsPlugin"
  375. },
  376. "setup": [
  377. [
  378. "$TC actions flush action tunnel_key",
  379. 0,
  380. 1,
  381. 255
  382. ]
  383. ],
  384. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 429 dst_port 65535 index 1",
  385. "expExitCode": "0",
  386. "verifyCmd": "$TC actions get action tunnel_key index 1",
  387. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 429.*dst_port 65535.*index 1",
  388. "matchCount": "1",
  389. "teardown": [
  390. "$TC actions flush action tunnel_key"
  391. ]
  392. },
  393. {
  394. "id": "3bd9",
  395. "name": "Add tunnel_key set action with dst_port value exceeding 16-bit maximum",
  396. "category": [
  397. "actions",
  398. "tunnel_key"
  399. ],
  400. "plugins": {
  401. "requires": "nsPlugin"
  402. },
  403. "setup": [
  404. [
  405. "$TC actions flush action tunnel_key",
  406. 0,
  407. 1,
  408. 255
  409. ]
  410. ],
  411. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 429 dst_port 65535789 index 1",
  412. "expExitCode": "255",
  413. "verifyCmd": "$TC actions get action tunnel_key index 1",
  414. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 429.*dst_port 65535789.*index 1",
  415. "matchCount": "0",
  416. "teardown": [
  417. [
  418. "$TC actions flush action tunnel_key",
  419. 0,
  420. 1,
  421. 255
  422. ]
  423. ]
  424. },
  425. {
  426. "id": "68e2",
  427. "name": "Add tunnel_key unset action",
  428. "category": [
  429. "actions",
  430. "tunnel_key"
  431. ],
  432. "plugins": {
  433. "requires": "nsPlugin"
  434. },
  435. "setup": [
  436. [
  437. "$TC actions flush action tunnel_key",
  438. 0,
  439. 1,
  440. 255
  441. ]
  442. ],
  443. "cmdUnderTest": "$TC actions add action tunnel_key unset index 1",
  444. "expExitCode": "0",
  445. "verifyCmd": "$TC actions get action tunnel_key index 1",
  446. "matchPattern": "action order [0-9]+: tunnel_key.*unset.*index 1 ref",
  447. "matchCount": "1",
  448. "teardown": [
  449. "$TC actions flush action tunnel_key"
  450. ]
  451. },
  452. {
  453. "id": "6192",
  454. "name": "Add tunnel_key unset continue action",
  455. "category": [
  456. "actions",
  457. "tunnel_key"
  458. ],
  459. "plugins": {
  460. "requires": "nsPlugin"
  461. },
  462. "setup": [
  463. [
  464. "$TC actions flush action tunnel_key",
  465. 0,
  466. 1,
  467. 255
  468. ]
  469. ],
  470. "cmdUnderTest": "$TC actions add action tunnel_key unset continue index 1",
  471. "expExitCode": "0",
  472. "verifyCmd": "$TC actions get action tunnel_key index 1",
  473. "matchPattern": "action order [0-9]+: tunnel_key.*unset continue.*index 1 ref",
  474. "matchCount": "1",
  475. "teardown": [
  476. "$TC actions flush action tunnel_key"
  477. ]
  478. },
  479. {
  480. "id": "061d",
  481. "name": "Add tunnel_key set continue action with cookie",
  482. "category": [
  483. "actions",
  484. "tunnel_key"
  485. ],
  486. "plugins": {
  487. "requires": "nsPlugin"
  488. },
  489. "setup": [
  490. [
  491. "$TC actions flush action tunnel_key",
  492. 0,
  493. 1,
  494. 255
  495. ]
  496. ],
  497. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.10.1 dst_ip 192.168.20.2 id 123 continue index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
  498. "expExitCode": "0",
  499. "verifyCmd": "$TC actions get action tunnel_key index 1",
  500. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
  501. "matchCount": "1",
  502. "teardown": [
  503. "$TC actions flush action tunnel_key"
  504. ]
  505. },
  506. {
  507. "id": "8acb",
  508. "name": "Add tunnel_key set continue action with invalid cookie",
  509. "category": [
  510. "actions",
  511. "tunnel_key"
  512. ],
  513. "plugins": {
  514. "requires": "nsPlugin"
  515. },
  516. "setup": [
  517. [
  518. "$TC actions flush action tunnel_key",
  519. 0,
  520. 1,
  521. 255
  522. ]
  523. ],
  524. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 192.168.10.1 dst_ip 192.168.20.2 id 123 continue index 1 cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
  525. "expExitCode": "255",
  526. "verifyCmd": "$TC actions get action tunnel_key index 1",
  527. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 192.168.10.1.*dst_ip 192.168.20.2.*key_id 123.*csum continue.*index 1.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888",
  528. "matchCount": "0",
  529. "teardown": [
  530. [
  531. "$TC actions flush action tunnel_key",
  532. 0,
  533. 1,
  534. 255
  535. ]
  536. ]
  537. },
  538. {
  539. "id": "a07e",
  540. "name": "Add tunnel_key action with no set/unset command specified",
  541. "category": [
  542. "actions",
  543. "tunnel_key"
  544. ],
  545. "plugins": {
  546. "requires": "nsPlugin"
  547. },
  548. "setup": [
  549. [
  550. "$TC actions flush action tunnel_key",
  551. 0,
  552. 1,
  553. 255
  554. ]
  555. ],
  556. "cmdUnderTest": "$TC actions add action tunnel_key src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1",
  557. "expExitCode": "255",
  558. "verifyCmd": "$TC actions get action tunnel_key index 1",
  559. "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1",
  560. "matchCount": "0",
  561. "teardown": [
  562. [
  563. "$TC actions flush action tunnel_key",
  564. 0,
  565. 1,
  566. 255
  567. ]
  568. ]
  569. },
  570. {
  571. "id": "b227",
  572. "name": "Add tunnel_key action with csum option",
  573. "category": [
  574. "actions",
  575. "tunnel_key"
  576. ],
  577. "plugins": {
  578. "requires": "nsPlugin"
  579. },
  580. "setup": [
  581. [
  582. "$TC actions flush action tunnel_key",
  583. 0,
  584. 1,
  585. 255
  586. ]
  587. ],
  588. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1 csum index 99",
  589. "expExitCode": "0",
  590. "verifyCmd": "$TC actions get action tunnel_key index 99",
  591. "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*csum pipe.*index 99",
  592. "matchCount": "1",
  593. "teardown": [
  594. "$TC actions flush action tunnel_key"
  595. ]
  596. },
  597. {
  598. "id": "58a7",
  599. "name": "Add tunnel_key action with nocsum option",
  600. "category": [
  601. "actions",
  602. "tunnel_key"
  603. ],
  604. "plugins": {
  605. "requires": "nsPlugin"
  606. },
  607. "setup": [
  608. [
  609. "$TC actions flush action tunnel_key",
  610. 0,
  611. 1,
  612. 255
  613. ]
  614. ],
  615. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7823 nocsum index 234",
  616. "expExitCode": "0",
  617. "verifyCmd": "$TC actions get action tunnel_key index 234",
  618. "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7823.*nocsum pipe.*index 234",
  619. "matchCount": "1",
  620. "teardown": [
  621. "$TC actions flush action tunnel_key"
  622. ]
  623. },
  624. {
  625. "id": "2575",
  626. "name": "Add tunnel_key action with not-supported parameter",
  627. "category": [
  628. "actions",
  629. "tunnel_key"
  630. ],
  631. "plugins": {
  632. "requires": "nsPlugin"
  633. },
  634. "setup": [
  635. [
  636. "$TC actions flush action tunnel_key",
  637. 0,
  638. 1,
  639. 255
  640. ]
  641. ],
  642. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7 foobar 999 index 4",
  643. "expExitCode": "255",
  644. "verifyCmd": "$TC actions get action tunnel_key index 4",
  645. "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*foobar 999.*index 4",
  646. "matchCount": "0",
  647. "teardown": [
  648. [
  649. "$TC actions flush action tunnel_key",
  650. 0,
  651. 1,
  652. 255
  653. ]
  654. ]
  655. },
  656. {
  657. "id": "7a88",
  658. "name": "Add tunnel_key action with cookie parameter",
  659. "category": [
  660. "actions",
  661. "tunnel_key"
  662. ],
  663. "plugins": {
  664. "requires": "nsPlugin"
  665. },
  666. "setup": [
  667. [
  668. "$TC actions flush action tunnel_key",
  669. 0,
  670. 1,
  671. 255
  672. ]
  673. ],
  674. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 7 index 4 cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
  675. "expExitCode": "0",
  676. "verifyCmd": "$TC actions get action tunnel_key index 4",
  677. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 7.*csum pipe.*index 4 ref.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2",
  678. "matchCount": "1",
  679. "teardown": [
  680. "$TC actions flush action tunnel_key"
  681. ]
  682. },
  683. {
  684. "id": "4f20",
  685. "name": "Add tunnel_key action with a single geneve option parameter",
  686. "category": [
  687. "actions",
  688. "tunnel_key"
  689. ],
  690. "plugins": {
  691. "requires": "nsPlugin"
  692. },
  693. "setup": [
  694. [
  695. "$TC actions flush action tunnel_key",
  696. 0,
  697. 1,
  698. 255
  699. ]
  700. ],
  701. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022 index 1",
  702. "expExitCode": "0",
  703. "verifyCmd": "$TC actions get action tunnel_key index 1",
  704. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:80:00880022.*index 1",
  705. "matchCount": "1",
  706. "teardown": [
  707. "$TC actions flush action tunnel_key"
  708. ]
  709. },
  710. {
  711. "id": "e33d",
  712. "name": "Add tunnel_key action with multiple geneve options parameter",
  713. "category": [
  714. "actions",
  715. "tunnel_key"
  716. ],
  717. "plugins": {
  718. "requires": "nsPlugin"
  719. },
  720. "setup": [
  721. [
  722. "$TC actions flush action tunnel_key",
  723. 0,
  724. 1,
  725. 255
  726. ]
  727. ],
  728. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344 index 1",
  729. "expExitCode": "0",
  730. "verifyCmd": "$TC actions get action tunnel_key index 1",
  731. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:80:00880022,0408:42:0040007611223344,0111:02:1020304011223344.*index 1",
  732. "matchCount": "1",
  733. "teardown": [
  734. "$TC actions flush action tunnel_key"
  735. ]
  736. },
  737. {
  738. "id": "0778",
  739. "name": "Add tunnel_key action with invalid class geneve option parameter",
  740. "category": [
  741. "actions",
  742. "tunnel_key"
  743. ],
  744. "plugins": {
  745. "requires": "nsPlugin"
  746. },
  747. "setup": [
  748. [
  749. "$TC actions flush action tunnel_key",
  750. 0,
  751. 1,
  752. 255
  753. ]
  754. ],
  755. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 824212:80:00880022 index 1",
  756. "expExitCode": "255",
  757. "verifyCmd": "$TC actions get action tunnel_key index 1",
  758. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 824212:80:00880022.*index 1",
  759. "matchCount": "0",
  760. "teardown": [
  761. "$TC actions flush action tunnel_key"
  762. ]
  763. },
  764. {
  765. "id": "4ae8",
  766. "name": "Add tunnel_key action with invalid type geneve option parameter",
  767. "category": [
  768. "actions",
  769. "tunnel_key"
  770. ],
  771. "plugins": {
  772. "requires": "nsPlugin"
  773. },
  774. "setup": [
  775. [
  776. "$TC actions flush action tunnel_key",
  777. 0,
  778. 1,
  779. 255
  780. ]
  781. ],
  782. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:4224:00880022 index 1",
  783. "expExitCode": "255",
  784. "verifyCmd": "$TC actions get action tunnel_key index 1",
  785. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:4224:00880022.*index 1",
  786. "matchCount": "0",
  787. "teardown": [
  788. "$TC actions flush action tunnel_key"
  789. ]
  790. },
  791. {
  792. "id": "4039",
  793. "name": "Add tunnel_key action with short data length geneve option parameter",
  794. "category": [
  795. "actions",
  796. "tunnel_key"
  797. ],
  798. "plugins": {
  799. "requires": "nsPlugin"
  800. },
  801. "setup": [
  802. [
  803. "$TC actions flush action tunnel_key",
  804. 0,
  805. 1,
  806. 255
  807. ]
  808. ],
  809. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288 index 1",
  810. "expExitCode": "255",
  811. "verifyCmd": "$TC actions get action tunnel_key index 1",
  812. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:80:4288.*index 1",
  813. "matchCount": "0",
  814. "teardown": [
  815. "$TC actions flush action tunnel_key"
  816. ]
  817. },
  818. {
  819. "id": "26a6",
  820. "name": "Add tunnel_key action with non-multiple of 4 data length geneve option parameter",
  821. "category": [
  822. "actions",
  823. "tunnel_key"
  824. ],
  825. "plugins": {
  826. "requires": "nsPlugin"
  827. },
  828. "setup": [
  829. [
  830. "$TC actions flush action tunnel_key",
  831. 0,
  832. 1,
  833. 255
  834. ]
  835. ],
  836. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:4288428822 index 1",
  837. "expExitCode": "255",
  838. "verifyCmd": "$TC actions get action tunnel_key index 1",
  839. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:80:4288428822.*index 1",
  840. "matchCount": "0",
  841. "teardown": [
  842. "$TC actions flush action tunnel_key"
  843. ]
  844. },
  845. {
  846. "id": "f44d",
  847. "name": "Add tunnel_key action with incomplete geneve options parameter",
  848. "category": [
  849. "actions",
  850. "tunnel_key"
  851. ],
  852. "plugins": {
  853. "requires": "nsPlugin"
  854. },
  855. "setup": [
  856. [
  857. "$TC actions flush action tunnel_key",
  858. 0,
  859. 1,
  860. 255
  861. ]
  862. ],
  863. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 id 42 dst_port 6081 geneve_opts 0102:80:00880022,0408:42: index 1",
  864. "expExitCode": "255",
  865. "verifyCmd": "$TC actions get action tunnel_key index 1",
  866. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*key_id 42.*dst_port 6081.*geneve_opt[s]? 0102:80:00880022,0408:42:.*index 1",
  867. "matchCount": "0",
  868. "teardown": [
  869. "$TC actions flush action tunnel_key"
  870. ]
  871. },
  872. {
  873. "id": "7afc",
  874. "name": "Replace tunnel_key set action with all parameters",
  875. "category": [
  876. "actions",
  877. "tunnel_key"
  878. ],
  879. "plugins": {
  880. "requires": "nsPlugin"
  881. },
  882. "setup": [
  883. [
  884. "$TC actions flush action tunnel_key",
  885. 0,
  886. 1,
  887. 255
  888. ],
  889. "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 csum id 1 index 1"
  890. ],
  891. "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 11.11.11.1 dst_ip 21.21.21.2 dst_port 3129 nocsum id 11 index 1",
  892. "expExitCode": "0",
  893. "verifyCmd": "$TC actions get action tunnel_key index 1",
  894. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 11.11.11.1.*dst_ip 21.21.21.2.*key_id 11.*dst_port 3129.*nocsum pipe.*index 1",
  895. "matchCount": "1",
  896. "teardown": [
  897. "$TC actions flush action tunnel_key"
  898. ]
  899. },
  900. {
  901. "id": "364d",
  902. "name": "Replace tunnel_key set action with all parameters and cookie",
  903. "category": [
  904. "actions",
  905. "tunnel_key"
  906. ],
  907. "plugins": {
  908. "requires": "nsPlugin"
  909. },
  910. "setup": [
  911. [
  912. "$TC actions flush action tunnel_key",
  913. 0,
  914. 1,
  915. 255
  916. ],
  917. "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 index 1 cookie 123456"
  918. ],
  919. "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 11.11.11.1 dst_ip 21.21.21.2 dst_port 3129 id 11 csum reclassify index 1 cookie 123456",
  920. "expExitCode": "0",
  921. "verifyCmd": "$TC actions get action tunnel_key index 1",
  922. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 11.11.11.1.*dst_ip 21.21.21.2.*key_id 11.*dst_port 3129.*csum reclassify.*index 1.*cookie 123456",
  923. "matchCount": "1",
  924. "teardown": [
  925. "$TC actions flush action tunnel_key"
  926. ]
  927. },
  928. {
  929. "id": "937c",
  930. "name": "Fetch all existing tunnel_key actions",
  931. "category": [
  932. "actions",
  933. "tunnel_key"
  934. ],
  935. "plugins": {
  936. "requires": "nsPlugin"
  937. },
  938. "setup": [
  939. [
  940. "$TC actions flush action tunnel_key",
  941. 0,
  942. 1,
  943. 255
  944. ],
  945. "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pipe index 1",
  946. "$TC actions add action tunnel_key set src_ip 11.10.10.1 dst_ip 21.20.20.2 dst_port 3129 csum id 2 jump 10 index 2",
  947. "$TC actions add action tunnel_key set src_ip 12.10.10.1 dst_ip 22.20.20.2 dst_port 3130 csum id 3 pass index 3",
  948. "$TC actions add action tunnel_key set src_ip 13.10.10.1 dst_ip 23.20.20.2 dst_port 3131 nocsum id 4 continue index 4"
  949. ],
  950. "cmdUnderTest": "$TC actions list action tunnel_key",
  951. "expExitCode": "0",
  952. "verifyCmd": "$TC actions list action tunnel_key",
  953. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*dst_port 3128.*nocsum pipe.*index 1.*set.*src_ip 11.10.10.1.*dst_ip 21.20.20.2.*key_id 2.*dst_port 3129.*csum jump 10.*index 2.*set.*src_ip 12.10.10.1.*dst_ip 22.20.20.2.*key_id 3.*dst_port 3130.*csum pass.*index 3.*set.*src_ip 13.10.10.1.*dst_ip 23.20.20.2.*key_id 4.*dst_port 3131.*nocsum continue.*index 4",
  954. "matchCount": "1",
  955. "teardown": [
  956. "$TC actions flush action tunnel_key"
  957. ]
  958. },
  959. {
  960. "id": "6783",
  961. "name": "Flush all existing tunnel_key actions",
  962. "category": [
  963. "actions",
  964. "tunnel_key"
  965. ],
  966. "plugins": {
  967. "requires": "nsPlugin"
  968. },
  969. "setup": [
  970. [
  971. "$TC actions flush action tunnel_key",
  972. 0,
  973. 1,
  974. 255
  975. ],
  976. "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pipe index 1",
  977. "$TC actions add action tunnel_key set src_ip 11.10.10.1 dst_ip 21.20.20.2 dst_port 3129 csum id 2 reclassify index 2",
  978. "$TC actions add action tunnel_key set src_ip 12.10.10.1 dst_ip 22.20.20.2 dst_port 3130 csum id 3 pass index 3",
  979. "$TC actions add action tunnel_key set src_ip 13.10.10.1 dst_ip 23.20.20.2 dst_port 3131 nocsum id 4 continue index 4"
  980. ],
  981. "cmdUnderTest": "$TC actions flush action tunnel_key",
  982. "expExitCode": "0",
  983. "verifyCmd": "$TC actions list action tunnel_key",
  984. "matchPattern": "action order [0-9]+:.*",
  985. "matchCount": "0",
  986. "teardown": [
  987. "$TC actions flush action tunnel_key"
  988. ]
  989. },
  990. {
  991. "id": "8242",
  992. "name": "Replace tunnel_key set action with invalid goto chain",
  993. "category": [
  994. "actions",
  995. "tunnel_key"
  996. ],
  997. "plugins": {
  998. "requires": "nsPlugin"
  999. },
  1000. "setup": [
  1001. [
  1002. "$TC actions flush action tunnel_key",
  1003. 0,
  1004. 1,
  1005. 255
  1006. ],
  1007. "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 dst_port 3128 nocsum id 1 pass index 90"
  1008. ],
  1009. "cmdUnderTest": "$TC actions replace action tunnel_key set src_ip 10.10.10.2 dst_ip 20.20.20.1 dst_port 3129 id 2 csum goto chain 42 index 90 cookie c1a0c1a0",
  1010. "expExitCode": "255",
  1011. "verifyCmd": "$TC actions get action tunnel_key index 90",
  1012. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*dst_port 3128.*csum pass.*index 90 ref",
  1013. "matchCount": "1",
  1014. "teardown": [
  1015. "$TC actions flush action tunnel_key"
  1016. ]
  1017. },
  1018. {
  1019. "id": "0cd2",
  1020. "name": "Add tunnel_key set action with no_percpu flag",
  1021. "category": [
  1022. "actions",
  1023. "tunnel_key"
  1024. ],
  1025. "plugins": {
  1026. "requires": "nsPlugin"
  1027. },
  1028. "setup": [
  1029. [
  1030. "$TC actions flush action tunnel_key",
  1031. 0,
  1032. 1,
  1033. 255
  1034. ]
  1035. ],
  1036. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 20.20.20.2 id 1 no_percpu",
  1037. "expExitCode": "0",
  1038. "verifyCmd": "$TC actions list action tunnel_key",
  1039. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 10.10.10.1.*dst_ip 20.20.20.2.*key_id 1.*no_percpu",
  1040. "matchCount": "1",
  1041. "teardown": [
  1042. "$TC actions flush action tunnel_key"
  1043. ]
  1044. },
  1045. {
  1046. "id": "3671",
  1047. "name": "Delete tunnel_key set action with valid index",
  1048. "category": [
  1049. "actions",
  1050. "tunnel_key"
  1051. ],
  1052. "plugins": {
  1053. "requires": "nsPlugin"
  1054. },
  1055. "setup": [
  1056. [
  1057. "$TC actions flush action tunnel_key",
  1058. 0,
  1059. 1,
  1060. 255
  1061. ],
  1062. "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 index 1"
  1063. ],
  1064. "cmdUnderTest": "$TC actions del action tunnel_key index 1",
  1065. "expExitCode": "0",
  1066. "verifyCmd": "$TC actions list action tunnel_key",
  1067. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*index 1",
  1068. "matchCount": "0",
  1069. "teardown": [
  1070. "$TC actions flush action tunnel_key"
  1071. ]
  1072. },
  1073. {
  1074. "id": "8597",
  1075. "name": "Delete tunnel_key set action with invalid index",
  1076. "category": [
  1077. "actions",
  1078. "tunnel_key"
  1079. ],
  1080. "plugins": {
  1081. "requires": "nsPlugin"
  1082. },
  1083. "setup": [
  1084. [
  1085. "$TC actions flush action tunnel_key",
  1086. 0,
  1087. 1,
  1088. 255
  1089. ],
  1090. "$TC actions add action tunnel_key set src_ip 1.1.1.1 dst_ip 2.2.2.2 index 1"
  1091. ],
  1092. "cmdUnderTest": "$TC actions del action tunnel_key index 10",
  1093. "expExitCode": "255",
  1094. "verifyCmd": "$TC actions list action tunnel_key",
  1095. "matchPattern": "action order [0-9]+: tunnel_key.*set.*src_ip 1.1.1.1.*dst_ip 2.2.2.2.*index 1",
  1096. "matchCount": "1",
  1097. "teardown": [
  1098. "$TC actions flush action tunnel_key"
  1099. ]
  1100. },
  1101. {
  1102. "id": "6bda",
  1103. "name": "Add tunnel_key action with nofrag option",
  1104. "category": [
  1105. "actions",
  1106. "tunnel_key"
  1107. ],
  1108. "plugins": {
  1109. "requires": "nsPlugin"
  1110. },
  1111. "dependsOn": "$TC actions add action tunnel_key help 2>&1 | grep -q nofrag",
  1112. "setup": [
  1113. [
  1114. "$TC action flush action tunnel_key",
  1115. 0,
  1116. 1,
  1117. 255
  1118. ]
  1119. ],
  1120. "cmdUnderTest": "$TC actions add action tunnel_key set src_ip 10.10.10.1 dst_ip 10.10.10.2 id 1111 nofrag index 222",
  1121. "expExitCode": "0",
  1122. "verifyCmd": "$TC actions get action tunnel_key index 222",
  1123. "matchPattern": "action order [0-9]+: tunnel_key.*src_ip 10.10.10.1.*dst_ip 10.10.10.2.*key_id 1111.*csum.*nofrag pipe.*index 222",
  1124. "matchCount": "1",
  1125. "teardown": [
  1126. "$TC actions flush action tunnel_key"
  1127. ]
  1128. }
  1129. ]