{ "info": { "_postman_id": "4092bf75-52e9-d793-36ab-c78696e33253", "name": "Hc2vpp BGP RESTCONF calls", "description": "Examples of BGP configration based on \nhttp://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "_postman_id": "f3e0f4e3-1faa-43e8-aeb2-3ac1525de40b", "name": "show hc-bgp-instance", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance" ] } }, "response": [] }, { "_postman_id": "7407ceb8-f112-4ac0-b40a-c07da58ff698", "name": "add bgp peer", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "{\n\t\"neighbor\": {\n \"neighbor-address\": \"127.0.0.2\",\n \"config\": {\n \"peer-type\": \"INTERNAL\"\n },\n \"timers\": {\n \"config\": {\n \"connect-retry\": 10,\n \"hold-time\": 90\n }\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 17900,\n \"passive-mode\": false\n }\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n}\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/127.0.0.2", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "openconfig-network-instance:network-instances", "network-instance", "global-bgp", "openconfig-network-instance:protocols", "protocol", "openconfig-policy-types:BGP", "hc-bgp-instance", "bgp", "bgp-openconfig-extensions:neighbors", "neighbor", "127.0.0.2" ] } }, "response": [] }, { "_postman_id": "99c2a219-4942-43d8-af21-437f9d8ae0c2", "name": "read network instance (config)", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "openconfig-network-instance:network-instances", "" ] } }, "response": [] }, { "_postman_id": "10da8355-7d52-45f6-8b8e-fb5020f52b88", "name": "show 127.0.0.2 peer state", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.2", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance", "peer", "bgp:%2F%2F127.0.0.2" ] } }, "response": [] }, { "_postman_id": "20661906-559e-46c5-8fa0-afa5b010b004", "name": "add application peer", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "{\n \"neighbor\": {\n \"neighbor-address\": \"10.25.1.9\",\n \"config\": {\n \"peer-group\": \"application-peers\"\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n }\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/10.25.1.9", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "openconfig-network-instance:network-instances", "network-instance", "global-bgp", "openconfig-network-instance:protocols", "protocol", "openconfig-policy-types:BGP", "hc-bgp-instance", "bgp", "bgp-openconfig-extensions:neighbors", "neighbor", "10.25.1.9" ] } }, "response": [] }, { "_postman_id": "b33d307d-ff95-4ed5-ab59-22ed0e88e6aa", "name": "show 10.25.1.9 app peer state", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F10.25.1.9", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance", "peer", "bgp:%2F%2F10.25.1.9" ] } }, "response": [] }, { "_postman_id": "2c3d280e-a98a-4b98-9204-a775124107bf", "name": "add ipv4unicast route", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 0\n 10.0.0.11/32\n \n \n \n igp\n \n \n 100\n \n \n 10.11.1.1\n \n \n" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.11%2F32/0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "10.25.1.9", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes", "ipv4-route", "10.0.0.11%2F32", "0" ] } }, "response": [] }, { "_postman_id": "436ccd51-3548-4d3e-967e-74ffb9a5e601", "name": "show 127.0.0.2 peer's adj-rib-out", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 192.0.2.1\n \n \n 90\n 10\n \n \n \n \n 179\n false\n \n \n \n INTERNAL\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/peer/bgp:%2F%2F127.0.0.2/adj-rib-out/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance", "peer", "bgp:%2F%2F127.0.0.2", "adj-rib-out", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes" ] } }, "response": [] }, { "_postman_id": "bf72955c-8d25-41c0-a34c-25bf909a65e7", "name": "show speeker's Loc-RIB", "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 10.25.1.9\n \n application-peers\n \n" }, "url": { "raw": "http://localhost:8183/restconf/operational/bgp-rib:bgp-rib/rib/hc-bgp-instance/loc-rib", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "bgp-rib:bgp-rib", "rib", "hc-bgp-instance", "loc-rib" ] } }, "response": [] }, { "_postman_id": "2d83d868-e8f6-40dc-aa6e-401a7fa61a36", "name": "add another ipv4unicast route", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 0\n 10.0.0.12/32\n \n \n \n igp\n \n \n 100\n \n \n 10.11.1.1\n \n \n" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "10.25.1.9", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes", "ipv4-route", "10.0.0.12%2F32", "0" ] } }, "response": [] }, { "_postman_id": "9a436548-aa9e-4389-a4a9-1b5cfb89aaa3", "name": "get VPP IPv4 routes", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"routing-instance\":\n {\n \"name\":\"routing-1\",\n \"enabled\":\"true\",\n \"router-id\":\"192.168.2.1\",\n \"description\":\"Test routing instance\",\n \"routing-protocols\":{\n \"routing-protocol\":[\n {\n \"name\":\"test-routing-protocol\",\n \"description\":\"Test routing protocol\",\n \"enabled\":\"true\",\n \"type\":\"static\",\n \"static-routes\":{\n \"ipv4\":{\n \"route\":[\n {\n \"id\":1,\n \"description\":\"Test static route\",\n \"destination-prefix\":\"192.168.2.3/32\",\n \"next-hop\":\"192.168.2.8\"\n }\n ]\n }\n }\n } \n ]\n }\n } \n}" }, "url": { "raw": "http://localhost:8183/restconf/operational/hc2vpp-ietf-routing:routing-state/routing-instance/vpp-routing-instance/routing-protocols/routing-protocol/learned-protocol-0/static-routes/hc2vpp-ietf-ipv4-unicast-routing:ipv4", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "operational", "hc2vpp-ietf-routing:routing-state", "routing-instance", "vpp-routing-instance", "routing-protocols", "routing-protocol", "learned-protocol-0", "static-routes", "hc2vpp-ietf-ipv4-unicast-routing:ipv4" ] } }, "response": [] }, { "_postman_id": "bb9ae871-9ca1-4456-be14-2d9a1d2ef152", "name": "update second ipv4unicast route", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "\n 0\n 10.0.0.12/32\n \n \n \n igp\n \n \n 102\n \n \n 10.11.1.1\n \n \n" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "10.25.1.9", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes", "ipv4-route", "10.0.0.12%2F32", "0" ] } }, "response": [] }, { "_postman_id": "7acec3bd-ff58-46ca-b3d4-2d5c91a507cc", "name": "remove second ipv4unicast route", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/xml" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/config/bgp-rib:application-rib/10.25.1.9/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ipv4-route/10.0.0.12%2F32/0", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "bgp-rib:application-rib", "10.25.1.9", "tables", "bgp-types:ipv4-address-family", "bgp-types:unicast-subsequent-address-family", "bgp-inet:ipv4-routes", "ipv4-route", "10.0.0.12%2F32", "0" ] } }, "response": [] }, { "_postman_id": "fa920481-50f0-4754-8260-929bbe1e86ae", "name": "update bgp peer", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "{\n\t\"neighbor\": {\n \"neighbor-address\": \"127.0.0.2\",\n \"config\": {\n \"peer-type\": \"INTERNAL\"\n },\n \"timers\": {\n \"config\": {\n \"connect-retry\": 10,\n \"hold-time\": 91\n }\n },\n \"transport\": {\n \"config\": {\n \"remote-port\": 17900,\n \"passive-mode\": false\n }\n },\n \"afi-safis\": {\n \"afi-safi\": [\n {\n \"afi-safi-name\": \"openconfig-bgp-types:IPV4-UNICAST\",\n \"receive\": true,\n \"send-max\": 0\n }\n ]\n }\n}\n}" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/127.0.0.2", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "openconfig-network-instance:network-instances", "network-instance", "global-bgp", "openconfig-network-instance:protocols", "protocol", "openconfig-policy-types:BGP", "hc-bgp-instance", "bgp", "bgp-openconfig-extensions:neighbors", "neighbor", "127.0.0.2" ] } }, "response": [] }, { "_postman_id": "dfd36e6b-95bc-4b17-84fd-a72672e1e075", "name": "delete bgp peer", "request": { "method": "DELETE", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Basic YWRtaW46YWRtaW4=" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "http://localhost:8183/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/bgp-openconfig-extensions:neighbors/neighbor/127.0.0.2", "protocol": "http", "host": [ "localhost" ], "port": "8183", "path": [ "restconf", "config", "openconfig-network-instance:network-instances", "network-instance", "global-bgp", "openconfig-network-instance:protocols", "protocol", "openconfig-policy-types:BGP", "hc-bgp-instance", "bgp", "bgp-openconfig-extensions:neighbors", "neighbor", "127.0.0.2" ] } }, "response": [] } ] }