mpls_postman_collection.json revision fe9af79a
1{
2	"info": {
3		"_postman_id": "339d199d-968a-4087-82cf-322a6ccd249f",
4		"name": "Honeycomb MPLS calls",
5		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6	},
7	"item": [
8		{
9			"name": "Add loopback ifc ",
10			"request": {
11				"method": "PUT",
12				"header": [
13					{
14						"key": "Authorization",
15						"value": "Basic YWRtaW46YWRtaW4="
16					},
17					{
18						"key": "Content-Type",
19						"value": "application/json"
20					}
21				],
22				"body": {
23					"mode": "raw",
24					"raw": "{\r\n    \r\n    \"interface\": [\r\n        {\r\n            \"name\": \"loop0\",\r\n            \"description\": \"for testing purposes\",\r\n            \"type\": \"v3po:loopback\",\r\n            \"loopback\" :{\r\n                \"mac\" : \"00:ff:ff:ff:ff:ff\"\r\n            }\r\n        }\r\n    ]\r\n    \r\n}"
25				},
26				"url": {
27					"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/loop0",
28					"protocol": "http",
29					"host": [
30						"localhost"
31					],
32					"port": "8183",
33					"path": [
34						"restconf",
35						"config",
36						"ietf-interfaces:interfaces",
37						"interface",
38						"loop0"
39					]
40				},
41				"description": "Corresponding CLI command:\n\ncreate loop interface"
42			},
43			"response": []
44		},
45		{
46			"name": "List ifcs - cfg",
47			"request": {
48				"method": "GET",
49				"header": [
50					{
51						"key": "Authorization",
52						"value": "Basic YWRtaW46YWRtaW4="
53					},
54					{
55						"key": "Content-Type",
56						"value": "application/json"
57					}
58				],
59				"body": {
60					"mode": "raw",
61					"raw": "{\r\n    \r\n        \"interface\": [\r\n            {\r\n                \"name\": \"testInterface\",\r\n                \"description\": \"for testing purposes\",\r\n                \"type\": \"iana-if-type:ethernetCsmacd\",\r\n                \"enabled\": \"true\",\r\n                \"link-up-down-trap-enable\": \"enabled\",\r\n                \"ietf-ip:ipv4\": {\r\n                    \"enabled\": \"true\",\r\n                    \"mtu\": \"1500\",\r\n                    \"address\": [\r\n                        {\r\n                            \"ip\": \"1.2.3.0\",\r\n                            \"netmask\": \"255.255.255.0\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        ]\r\n    \r\n}"
62				},
63				"url": {
64					"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/",
65					"protocol": "http",
66					"host": [
67						"localhost"
68					],
69					"port": "8183",
70					"path": [
71						"restconf",
72						"config",
73						"ietf-interfaces:interfaces",
74						""
75					]
76				}
77			},
78			"response": []
79		},
80		{
81			"name": "List ifcs - oper",
82			"request": {
83				"method": "GET",
84				"header": [
85					{
86						"key": "Authorization",
87						"value": "Basic YWRtaW46YWRtaW4="
88					},
89					{
90						"key": "Content-Type",
91						"value": "application/json"
92					}
93				],
94				"body": {
95					"mode": "raw",
96					"raw": "{\r\n    \r\n        \"interface\": [\r\n            {\r\n                \"name\": \"testInterface\",\r\n                \"description\": \"for testing purposes\",\r\n                \"type\": \"iana-if-type:ethernetCsmacd\",\r\n                \"enabled\": \"true\",\r\n                \"link-up-down-trap-enable\": \"enabled\",\r\n                \"ietf-ip:ipv4\": {\r\n                    \"enabled\": \"true\",\r\n                    \"mtu\": \"1500\",\r\n                    \"address\": [\r\n                        {\r\n                            \"ip\": \"1.2.3.0\",\r\n                            \"netmask\": \"255.255.255.0\"\r\n                        }\r\n                    ]\r\n                }\r\n            }\r\n        ]\r\n    \r\n}"
97				},
98				"url": {
99					"raw": "http://localhost:8183/restconf/operational/ietf-interfaces:interfaces-state/",
100					"protocol": "http",
101					"host": [
102						"localhost"
103					],
104					"port": "8183",
105					"path": [
106						"restconf",
107						"operational",
108						"ietf-interfaces:interfaces-state",
109						""
110					]
111				}
112			},
113			"response": []
114		},
115		{
116			"name": "Enable mpls on loop0 interface",
117			"request": {
118				"method": "PUT",
119				"header": [
120					{
121						"key": "Authorization",
122						"value": "Basic YWRtaW46YWRtaW4="
123					},
124					{
125						"key": "Content-Type",
126						"value": "application/json"
127					}
128				],
129				"body": {
130					"mode": "raw",
131					"raw": "{\n  \"interface\": [\n    {\n      \"name\": \"loop0\",\n      \"config\": {\n        \"enabled\": \"true\"\n      }\n    }\n  ]\n}"
132				},
133				"url": {
134					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/interface/loop0",
135					"protocol": "http",
136					"host": [
137						"localhost"
138					],
139					"port": "8183",
140					"path": [
141						"restconf",
142						"config",
143						"hc2vpp-ietf-routing:routing",
144						"hc2vpp-ietf-mpls:mpls",
145						"interface",
146						"loop0"
147					]
148				},
149				"description": "Correspondig CLI command:\n\nset interface mpls loop0 enable"
150			},
151			"response": []
152		},
153		{
154			"name": "Get mpls interfaces (cfg)",
155			"request": {
156				"method": "GET",
157				"header": [
158					{
159						"key": "Authorization",
160						"value": "Basic YWRtaW46YWRtaW4="
161					},
162					{
163						"key": "Content-Type",
164						"value": "application/json"
165					}
166				],
167				"body": {
168					"mode": "raw",
169					"raw": ""
170				},
171				"url": {
172					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls",
173					"protocol": "http",
174					"host": [
175						"localhost"
176					],
177					"port": "8183",
178					"path": [
179						"restconf",
180						"config",
181						"hc2vpp-ietf-routing:routing",
182						"hc2vpp-ietf-mpls:mpls"
183					]
184				}
185			},
186			"response": []
187		},
188		{
189			"name": "Push single MPLS label",
190			"request": {
191				"method": "PUT",
192				"header": [
193					{
194						"key": "Authorization",
195						"value": "Basic YWRtaW46YWRtaW4="
196					},
197					{
198						"key": "Content-Type",
199						"value": "application/json"
200					}
201				],
202				"body": {
203					"mode": "raw",
204					"raw": "{\n  \"static-lsp\": [{\n    \"name\": \"static-lsp0\",\n    \"config\": {\n      \"in-segment\": {\n        \"config\": {\n          \"ip-prefix\": \"10.10.34.0/24\"\n        }\n      },\n      \"operation\": \"impose-and-forward\"\n    },\n    \"simple-path\": {\n      \"config\": {\n        \"next-hop\": \"10.10.13.3\",\n        \"outgoing-label\": 111,\n        \"outgoing-interface\": \"loop0\"\n      }\n    }\n  }]\n}"
205				},
206				"url": {
207					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp0",
208					"protocol": "http",
209					"host": [
210						"localhost"
211					],
212					"port": "8183",
213					"path": [
214						"restconf",
215						"config",
216						"hc2vpp-ietf-routing:routing",
217						"hc2vpp-ietf-mpls:mpls",
218						"hc2vpp-ietf-mpls-static:static-lsps",
219						"static-lsp",
220						"static-lsp0"
221					]
222				},
223				"description": "Corresponding CLI command:\n\nip route add 10.10.34.0/24 via 10.10.13.3 loop0 out-labels 111\n\nCan be verified via CLI using:\n\nshow ip fib 10.10.34.0/24"
224			},
225			"response": []
226		},
227		{
228			"name": "Push two MPLS labels",
229			"request": {
230				"method": "PUT",
231				"header": [
232					{
233						"key": "Authorization",
234						"value": "Basic YWRtaW46YWRtaW4="
235					},
236					{
237						"key": "Content-Type",
238						"value": "application/json"
239					}
240				],
241				"body": {
242					"mode": "raw",
243					"raw": "{\r\n  \"static-lsp\": [{\r\n    \"name\": \"static-lsp1\",\r\n    \"config\": {\r\n      \"in-segment\": {\r\n        \"config\": {\r\n          \"ip-prefix\": \"10.10.24.0/24\"\r\n        }\r\n      },\r\n      \"operation\": \"impose-and-forward\"\r\n    },\r\n    \"paths\": {\r\n      \"path\": [{\r\n        \"path-index\": 0,\r\n        \"config\" : {\r\n          \"path-index\": 0,\r\n          \"next-hop\": \"10.10.12.2\",\r\n          \"outgoing-interface\": \"loop0\"  \r\n        }\r\n      }],\r\n      \"outgoing-labels\": {\r\n        \"outgoing-labels\": [\r\n          {\r\n            \"index\": 0,\r\n            \"config\": {\r\n              \"index\": 0,\r\n              \"label\": 102\r\n            }\r\n          },\r\n          {\r\n            \"index\": 1,\r\n            \"config\": {\r\n              \"index\": 1,\r\n              \"label\": 104\r\n            }\r\n          }\r\n          ]\r\n      }\r\n    }\r\n  }]\r\n}"
244				},
245				"url": {
246					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp1",
247					"protocol": "http",
248					"host": [
249						"localhost"
250					],
251					"port": "8183",
252					"path": [
253						"restconf",
254						"config",
255						"hc2vpp-ietf-routing:routing",
256						"hc2vpp-ietf-mpls:mpls",
257						"hc2vpp-ietf-mpls-static:static-lsps",
258						"static-lsp",
259						"static-lsp1"
260					]
261				},
262				"description": "Corresponding CLI command:\n\nip route add 10.10.24.0/24 via 10.10.12.2 loop1 out-labels 102 104\n\nCan be verified via CLI using:\n\nshow ip fib 10.10.24.0/24"
263			},
264			"response": []
265		},
266		{
267			"name": "Pop label and MPLS lookup",
268			"request": {
269				"method": "PUT",
270				"header": [
271					{
272						"key": "Authorization",
273						"value": "Basic YWRtaW46YWRtaW4="
274					},
275					{
276						"key": "Content-Type",
277						"value": "application/json"
278					}
279				],
280				"body": {
281					"mode": "raw",
282					"raw": "{\n  \"static-lsp\": [{\n    \"name\": \"static-lsp2\",\n    \"config\": {\n      \"in-segment\": {\n        \"config\": {\n          \"incoming-label\": 102\n        }\n      },\n      \"operation\": \"pop-and-lookup\",\n      \"vpp-mpls:label-lookup\": {\n        \"type\": \"mpls\",\n        \"mpls-lookup-in-table\": 0\n      }\n    }\n  }]\n}"
283				},
284				"url": {
285					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp2",
286					"protocol": "http",
287					"host": [
288						"localhost"
289					],
290					"port": "8183",
291					"path": [
292						"restconf",
293						"config",
294						"hc2vpp-ietf-routing:routing",
295						"hc2vpp-ietf-mpls:mpls",
296						"hc2vpp-ietf-mpls-static:static-lsps",
297						"static-lsp",
298						"static-lsp2"
299					]
300				},
301				"description": "Corresponding CLI command:\n\nmpls local-label add non-eos 102 mpls-lookup-in-table 0\n\n\nCan be verified via CLI using:\n\nshow mpls fib 102"
302			},
303			"response": []
304		},
305		{
306			"name": "Pop label and IPv4 lookup",
307			"request": {
308				"method": "PUT",
309				"header": [
310					{
311						"key": "Authorization",
312						"value": "Basic YWRtaW46YWRtaW4="
313					},
314					{
315						"key": "Content-Type",
316						"value": "application/json"
317					}
318				],
319				"body": {
320					"mode": "raw",
321					"raw": "{\n  \"static-lsp\": [{\n    \"name\": \"static-lsp3\",\n    \"config\": {\n      \"in-segment\": {\n        \"config\": {\n          \"incoming-label\": 104\n        }\n      },\n      \"operation\": \"pop-and-lookup\",\n      \"vpp-mpls:label-lookup\": {\n        \"type\": \"ipv4\",\n        \"ip4-lookup-in-table\": 0\n      }\n    }\n  }]\n}"
322				},
323				"url": {
324					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp3",
325					"protocol": "http",
326					"host": [
327						"localhost"
328					],
329					"port": "8183",
330					"path": [
331						"restconf",
332						"config",
333						"hc2vpp-ietf-routing:routing",
334						"hc2vpp-ietf-mpls:mpls",
335						"hc2vpp-ietf-mpls-static:static-lsps",
336						"static-lsp",
337						"static-lsp3"
338					]
339				},
340				"description": "Corresponding CLI command:\n\nmpls local-label add eos 104 ip4-lookup-in-table 0\n\n\nCan be verified via CLI using:\n\nshow mpls fib 104"
341			},
342			"response": []
343		},
344		{
345			"name": "Swap label and forward",
346			"request": {
347				"method": "PUT",
348				"header": [
349					{
350						"key": "Authorization",
351						"value": "Basic YWRtaW46YWRtaW4="
352					},
353					{
354						"key": "Content-Type",
355						"value": "application/json"
356					}
357				],
358				"body": {
359					"mode": "raw",
360					"raw": "{\n  \"static-lsp\": [{\n    \"name\": \"static-lsp4\",\n    \"config\": {\n      \"in-segment\": {\n        \"config\": {\n          \"incoming-label\": 123\n        }\n      },\n      \"operation\": \"swap-and-forward\"\n    },\n    \"simple-path\": {\n      \"config\": {\n        \"next-hop\": \"10.10.24.5\",\n        \"outgoing-label\": 123,\n        \"outgoing-interface\": \"loop0\"\n      }\n    }\n  }]\n}"
361				},
362				"url": {
363					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp4",
364					"protocol": "http",
365					"host": [
366						"localhost"
367					],
368					"port": "8183",
369					"path": [
370						"restconf",
371						"config",
372						"hc2vpp-ietf-routing:routing",
373						"hc2vpp-ietf-mpls:mpls",
374						"hc2vpp-ietf-mpls-static:static-lsps",
375						"static-lsp",
376						"static-lsp4"
377					]
378				},
379				"description": "Corresponding CLI command:\n\nmpls local-label add eos 123 via 10.10.24.4 loop0 out-labels 123\n\n\nCan be verified via CLI using:\n\nshow mpls fib 123"
380			},
381			"response": []
382		},
383		{
384			"name": "Get static LSPs (cfg)",
385			"request": {
386				"method": "GET",
387				"header": [
388					{
389						"key": "Authorization",
390						"value": "Basic YWRtaW46YWRtaW4="
391					},
392					{
393						"key": "Content-Type",
394						"value": "application/json"
395					}
396				],
397				"body": {
398					"mode": "raw",
399					"raw": ""
400				},
401				"url": {
402					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/",
403					"protocol": "http",
404					"host": [
405						"localhost"
406					],
407					"port": "8183",
408					"path": [
409						"restconf",
410						"config",
411						"hc2vpp-ietf-routing:routing",
412						"hc2vpp-ietf-mpls:mpls",
413						"hc2vpp-ietf-mpls-static:static-lsps",
414						""
415					]
416				}
417			},
418			"response": []
419		},
420		{
421			"name": "Delete single MPLS label push FIB entry",
422			"request": {
423				"method": "DELETE",
424				"header": [
425					{
426						"key": "Authorization",
427						"value": "Basic YWRtaW46YWRtaW4="
428					},
429					{
430						"key": "Content-Type",
431						"value": "application/json"
432					}
433				],
434				"body": {
435					"mode": "raw",
436					"raw": ""
437				},
438				"url": {
439					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp0",
440					"protocol": "http",
441					"host": [
442						"localhost"
443					],
444					"port": "8183",
445					"path": [
446						"restconf",
447						"config",
448						"hc2vpp-ietf-routing:routing",
449						"hc2vpp-ietf-mpls:mpls",
450						"hc2vpp-ietf-mpls-static:static-lsps",
451						"static-lsp",
452						"static-lsp0"
453					]
454				},
455				"description": "Corresponding CLI command:\n\nip route del 10.10.34.0/24 via 10.10.13.3 loop0 out-labels 111\n\nCan be verified via CLI using:\n\nshow ip fib"
456			},
457			"response": []
458		},
459		{
460			"name": "Delete FIB entry that pushes two MPLS labels",
461			"request": {
462				"method": "DELETE",
463				"header": [
464					{
465						"key": "Authorization",
466						"value": "Basic YWRtaW46YWRtaW4="
467					},
468					{
469						"key": "Content-Type",
470						"value": "application/json"
471					}
472				],
473				"body": {
474					"mode": "raw",
475					"raw": ""
476				},
477				"url": {
478					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp1",
479					"protocol": "http",
480					"host": [
481						"localhost"
482					],
483					"port": "8183",
484					"path": [
485						"restconf",
486						"config",
487						"hc2vpp-ietf-routing:routing",
488						"hc2vpp-ietf-mpls:mpls",
489						"hc2vpp-ietf-mpls-static:static-lsps",
490						"static-lsp",
491						"static-lsp1"
492					]
493				},
494				"description": "Corresponding CLI command:\n\nip route add 10.10.24.0/24 via 10.10.12.2 loop1 out-labels 102 104\n\nCan be verified via CLI using:\n\nshow ip fib"
495			},
496			"response": []
497		},
498		{
499			"name": "Delete label pop and MPLS lookup FIB entry",
500			"request": {
501				"method": "DELETE",
502				"header": [
503					{
504						"key": "Authorization",
505						"value": "Basic YWRtaW46YWRtaW4="
506					},
507					{
508						"key": "Content-Type",
509						"value": "application/json"
510					}
511				],
512				"body": {
513					"mode": "raw",
514					"raw": ""
515				},
516				"url": {
517					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp2",
518					"protocol": "http",
519					"host": [
520						"localhost"
521					],
522					"port": "8183",
523					"path": [
524						"restconf",
525						"config",
526						"hc2vpp-ietf-routing:routing",
527						"hc2vpp-ietf-mpls:mpls",
528						"hc2vpp-ietf-mpls-static:static-lsps",
529						"static-lsp",
530						"static-lsp2"
531					]
532				},
533				"description": "Corresponding CLI command:\n\nmpls local-label del non-eos 102 mpls-lookup-in-table 0\n\nCan be verified via CLI using:\n\nshow mpls fib"
534			},
535			"response": []
536		},
537		{
538			"name": "Delete label pop and IPv4 lookup FIB entry",
539			"request": {
540				"method": "DELETE",
541				"header": [
542					{
543						"key": "Authorization",
544						"value": "Basic YWRtaW46YWRtaW4="
545					},
546					{
547						"key": "Content-Type",
548						"value": "application/json"
549					}
550				],
551				"body": {
552					"mode": "raw",
553					"raw": ""
554				},
555				"url": {
556					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp3",
557					"protocol": "http",
558					"host": [
559						"localhost"
560					],
561					"port": "8183",
562					"path": [
563						"restconf",
564						"config",
565						"hc2vpp-ietf-routing:routing",
566						"hc2vpp-ietf-mpls:mpls",
567						"hc2vpp-ietf-mpls-static:static-lsps",
568						"static-lsp",
569						"static-lsp3"
570					]
571				},
572				"description": "Corresponding CLI command:\n\nmpls local-label del eos 104 ip4-lookup-in-table 0\n\nCan be verified via CLI using:\n\nshow mpls fib"
573			},
574			"response": []
575		},
576		{
577			"name": "Delete label swap FIB entry",
578			"request": {
579				"method": "DELETE",
580				"header": [
581					{
582						"key": "Authorization",
583						"value": "Basic YWRtaW46YWRtaW4="
584					},
585					{
586						"key": "Content-Type",
587						"value": "application/json"
588					}
589				],
590				"body": {
591					"mode": "raw",
592					"raw": ""
593				},
594				"url": {
595					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/hc2vpp-ietf-mpls-static:static-lsps/static-lsp/static-lsp4",
596					"protocol": "http",
597					"host": [
598						"localhost"
599					],
600					"port": "8183",
601					"path": [
602						"restconf",
603						"config",
604						"hc2vpp-ietf-routing:routing",
605						"hc2vpp-ietf-mpls:mpls",
606						"hc2vpp-ietf-mpls-static:static-lsps",
607						"static-lsp",
608						"static-lsp4"
609					]
610				},
611				"description": "Corresponding CLI command:\n\nmpls local-label del eos 123 via 10.10.24.4 loop0 out-labels 123\n\nCan be verified via CLI using:\n\nshow mpls fib"
612			},
613			"response": []
614		},
615		{
616			"name": "Disable mpls on loop0 interface",
617			"request": {
618				"method": "DELETE",
619				"header": [
620					{
621						"key": "Authorization",
622						"value": "Basic YWRtaW46YWRtaW4="
623					},
624					{
625						"key": "Content-Type",
626						"value": "application/json"
627					}
628				],
629				"body": {
630					"mode": "raw",
631					"raw": ""
632				},
633				"url": {
634					"raw": "http://localhost:8183/restconf/config/hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpls:mpls/interface/loop0",
635					"protocol": "http",
636					"host": [
637						"localhost"
638					],
639					"port": "8183",
640					"path": [
641						"restconf",
642						"config",
643						"hc2vpp-ietf-routing:routing",
644						"hc2vpp-ietf-mpls:mpls",
645						"interface",
646						"loop0"
647					]
648				},
649				"description": "Correspondig CLI command:\n\nset interface mpls loop0 disable"
650			},
651			"response": []
652		}
653	]
654}