{ "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": [] } ] }