summaryrefslogtreecommitdiffstats
path: root/vpp-classifier/policer_postman_collection.json
blob: 9a8852755b48ab75ee22c1da3556720d0b3ed2e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
{
	"info": {
		"_postman_id": "7e729e26-7b1d-fff8-ee6e-cdaf7cca1362",
		"name": "Policer Hc2vpp RESTCONF calls",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"_postman_id": "47825622-c880-4080-97b1-afebb0f7812a",
			"name": "Add policer1",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"policer\": [\n        {\n            \"name\": \"policy1\",\n            \"cir\": \"450\",\n            \"cb\": \"50000\",\n            \"rate-type\": \"kbps\",\n            \"round-type\": \"closest\",\n            \"type\": \"1r2c\",\n            \"conform-action\": {\n            \t\"meter-action-type\" : \"meter-action-transmit\"\n            },\n            \"exceed-action\": {\n            \t\"meter-action-type\" : \"meter-action-drop\"\n            }\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/config/policer:policers/policer/policy1",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"config",
						"policer:policers",
						"policer",
						"policy1"
					]
				},
				"description": "Adds policer1. Corresponding vpp cli command:\n\nvppctl configure policer name policy1 type 1r2c cir 450 cb 50000 rate kbps closest conform-action transmit exceed-action drop\n\nTo verify invoke:\n\nvppctl show policer"
			},
			"response": []
		},
		{
			"_postman_id": "360c90ae-7168-4075-8fc6-20c79437d9b5",
			"name": "read policers (oper)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"policer\": [\n        {\n            \"name\": \"policy1\",\n            \"cir\": \"450\",\n            \"cb\": \"50000\",\n            \"rate-type\": \"kbps\",\n            \"round-type\": \"closest\",\n            \"type\": \"1r2c\",\n            \"conform-action\": {\n            \t\"meter-action-type\" : \"meter-action-transmit\"\n            },\n            \"exceed-action\": {\n            \t\"meter-action-type\" : \"meter-action-drop\"\n            }\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/operational/policer:policers-state",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"operational",
						"policer:policers-state"
					]
				}
			},
			"response": []
		},
		{
			"_postman_id": "8fc54eb6-e02d-48ac-a70a-f1ca78c42b34",
			"name": "read policers (cfg)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"policer\": [\n        {\n            \"name\": \"policy1\",\n            \"cir\": \"450\",\n            \"cb\": \"50000\",\n            \"rate-type\": \"kbps\",\n            \"round-type\": \"closest\",\n            \"type\": \"1r2c\",\n            \"conform-action\": {\n            \t\"meter-action-type\" : \"meter-action-transmit\"\n            },\n            \"exceed-action\": {\n            \t\"meter-action-type\" : \"meter-action-drop\"\n            }\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/config/policer:policers",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"config",
						"policer:policers"
					]
				}
			},
			"response": []
		},
		{
			"_postman_id": "6c89f5bc-dfd8-4d71-be13-7996182f9d91",
			"name": "Add classify table",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"classify-table\": [\n        {\n            \"name\": \"table0\",\n            \"nbuckets\": \"2\",\n            \"memory_size\": \"1048576\",\n            \"miss_next\": \"permit\",\n            \"mask\": \"00:00:00:00:00:00:00:00:00:00:ff:ff:ff:ff:00:00\"\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/config/vpp-classifier:vpp-classifier/classify-table/table0",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"config",
						"vpp-classifier:vpp-classifier",
						"classify-table",
						"table0"
					]
				},
				"description": "Corresponds to cli command:\n\nclassify table mask l3 ip4 src"
			},
			"response": []
		},
		{
			"_postman_id": "f5d9d290-695b-4a51-b818-cac6e21df420",
			"name": "Add classify session",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"classify-session\": [\n        {\n            \"policer_hit_next\": \"policy1\",\n            \"color_classfier\": \"exceed-color\",\n            \"match\": \"00:00:00:00:00:00:00:00:00:00:c0:a8:01:02:00:00\"\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/config/vpp-classifier:vpp-classifier/classify-table/table0/classify-session/00:00:00:00:00:00:00:00:00:00:c0:a8:01:02:00:00",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"config",
						"vpp-classifier:vpp-classifier",
						"classify-table",
						"table0",
						"classify-session",
						"00:00:00:00:00:00:00:00:00:00:c0:a8:01:02:00:00"
					]
				},
				"description": "Corresponds to cli command:\n\nclassify session policer-hit-next policy1 exceed-color table-index 0 match l3 ip4 src 192.168.1.2"
			},
			"response": []
		},
		{
			"_postman_id": "5feea475-5e88-4b16-9386-5a9bf6035aa2",
			"name": "Show classify table (oper)",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"classify-table\": [\n        {\n            \"name\": \"table0\",\n            \"nbuckets\": \"2\",\n            \"memory_size\": \"1048576\",\n            \"miss_next\": \"permit\",\n            \"mask\": \"00:00:00:00:00:00:00:00:00:00:ff:ff:ff:ff:00:00\"\n        }\n    ]\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/operational/vpp-classifier:vpp-classifier-state/classify-table/table0",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"operational",
						"vpp-classifier:vpp-classifier-state",
						"classify-table",
						"table0"
					]
				}
			},
			"response": []
		},
		{
			"_postman_id": "dd64b3d0-24c8-475c-8de4-fc878c2815af",
			"name": "apply classfier table to local0 interface",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"interface-policer:policer\": {\n\t\t\"ip4-table\": \"table0\"\n    }\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/config/ietf-interfaces:interfaces/interface/local0/interface-policer:policer",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"config",
						"ietf-interfaces:interfaces",
						"interface",
						"local0",
						"interface-policer:policer"
					]
				},
				"description": "Corresponds to cli command:\nvppctl set policer classify interface 0 ip4-table 0\n\ncan be verified with\n\nvat# policer_classify_dump type ip4"
			},
			"response": []
		},
		{
			"_postman_id": "591a573f-f74f-45c7-b65a-9c9ae8279c13",
			"name": "show interface policer assignment",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Authorization",
						"value": "Basic YWRtaW46YWRtaW4="
					},
					{
						"key": "Content-Type",
						"value": "application/json"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"interface-policer:policer\": {\n\t\t\"ip4-table\": \"table0\"\n    }\n}"
				},
				"url": {
					"raw": "http://localhost:8183/restconf/operational/ietf-interfaces:interfaces-state/interface/local0/",
					"protocol": "http",
					"host": [
						"localhost"
					],
					"port": "8183",
					"path": [
						"restconf",
						"operational",
						"ietf-interfaces:interfaces-state",
						"interface",
						"local0",
						""
					]
				},
				"description": "Corresponds to\nvat# policer_classify_dump type ip4\nvat# policer_classify_dump type ip6\nvat# policer_classify_dump type l2"
			},
			"response": []
		}
	]
}