Add Network Resource Pools
A network resource pool defines values for the network resources, such as IPv4 loopback addresses, interface IP addresses, segment identifiers (SIDs), BGP cluster IDs, and so on, that are assigned to devices in your network.
Paragon Automation assigns values to the network resources in a device profile and an interface profile when automatic configuration is enabled for the network resources.
You can create a resource pool by using:
-
Paragon Automation UI. See Add Network Resource Pools for Device Onboarding by Using the GUI.
-
REST APIs. See Add Network Resource Pools by Using REST APIs.
Add Network Resource Pools for Device Onboarding by Using the GUI
To add network resource pools for device onboarding by using Paragon Automation UI:
After you define the resource pools, you can add device and interface profiles to Paragon Automation. See Add a Device Profile and Add an Interface Profile for details.
Add Network Resource Pools for L3VPN Service by Using the GUI
To add network resources for L3VPN service by using the Paragon Automation GUI:
You can view the order execution status and detailed task logs by navigating to Orchestration > Monitoring > Workflows. See About the Workflows Page.
Add Network Resource Pools by Using REST APIs
To create network resource pools by using REST APIs, you should be familiar working with the tools such as Postman to make API requests to Paragon Automation.
You will need values for the following parameters to create resource pools for the network resources:
-
The URL to the environment where Paragon Automation is running.
-
ID of the organization where you want to add the resource pools.
-
Username for accessing the organization.
-
Password for accessing the organization.
To create a resource pool:
This procedure details how to use Postman to execute the REST APIs. You can use other tools as well to execute the REST APIs.
Sample Files
This section provides a sample of the environment file, collection file, and the list of REST APIs that you can use to define network resources pools.
- Sample Postman Environment File
- Sample Postman Collection File for Device Onboarding
- Sample REST API to Create an IPv4 Address Pool
- Sample REST API to Create BGP Cluster ID Pool
- Sample Postman Collection File for Service Orchestration
- Sample REST API to Create Topology Resources for L3VPN Service
- Sample REST API to Create VPN Resources for L3VPN Service
Sample Postman Environment File
The following is a sample Postman environment file.
{ "id": "dae981a2-da91-4d6f-9094-87e6ea05003c", "name": "00-00-pa", "values": [ { "key": "server", "value": "web-ui-vip-address", "enabled": true }, { "key": "port", "value": "443", "enabled": true }, { "key": "Password", "value": "abc123", "type": "secret", "enabled": true }, { "key": "User", "value": "user@abc.com", "enabled": true }, { "key": "ORG", "value": "34a55586-2baf-4cce-b2e0-0b293b223af1", "type": "default", "enabled": true }, { "key": "SITE_ID", "value": "", "type": "any", "enabled": true } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2023-04-20T12:04:35.537Z", "_postman_exported_using": "Postman/10.12.13"
Sample Postman Collection File for Device Onboarding
The following is a sample Postman collection file to define values for IPv4 addresses and BGP cluster IDs.
{ "info": { "_postman_id": "7a32e6b1-d4ca-4166-9a9f-3777c2ae6ce4", "name": "Resource Profile creation", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "829664" }, "item": [ { "name": "01-Who am I and get orgs", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"ORG\", jsonData.privileges[0].org_id);" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://{{server}}:{{port}}/api/v1/self", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "api", "v1", "self" ] } }, "response": [] }, { "name": "02-pick-site", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"SITE_ID\", jsonData[0].id);" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://{{server}}:{{port}}/api/v1/orgs/{{ORG}}/sites", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "api", "v1", "orgs", "{{ORG}}", "sites" ] } }, "response": [] }, { "name": "03-Create L3 Addr", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"customer_id\": \"network-operator\",\n \"design_id\": \"l3-addr\",\n \"instance_id\": \"l3-stuff\",\n \"operation\": \"create\",\n \"l3_addr\": {\n \"loopbacks\": [\n {\n \"name\": \"range-192\",\n \"prefix\": \"10.1.192.0/18\"\n },\n {\n \"name\": \"range-2\",\n \"prefix\": \"10.2.2.0/24\"\n },\n {\n \"name\": \"range-3\",\n \"prefix\": \"10.3.3.0/24\"\n }\n ],\n \"ipv4_prefixes\": [\n {\n \"name\": \"pool-11\",\n \"prefix\": \"10.11.11.0/24\"\n },\n {\n \"name\": \"pool-12\",\n \"prefix\": \"10.12.12.0/24\"\n },\n {\n \"name\": \"pool-13\",\n \"prefix\": \"10.13.13.0/24\"\n },\n {\n \"name\": \"pool-14\",\n \"prefix\": \"10.14.14.0/24\"\n },\n {\n \"name\": \"pool-15\",\n \"prefix\": \"10.15.15.0/24\"\n },\n {\n \"name\": \"pool-16\",\n \"prefix\": \"10.16.16.0/24\"\n },\n {\n \"name\": \"pool-17\",\n \"prefix\": \"10.17.17.0/24\"\n },\n {\n \"name\": \"pool-18\",\n \"prefix\": \"10.18.18.0/24\"\n },\n {\n \"name\": \"pool-19\",\n \"prefix\": \"10.19.19.0/24\"\n },\n {\n \"name\": \"pool-20\",\n \"prefix\": \"10.20.20.0/24\"\n},\n {\n \"name\": \"pool-21\",\n \"prefix\": \"10.21.21.0/24\"\n },\n {\n \"name\": \"pool-22\",\n \"prefix\": \"10.22.22.0/24\"\n },\n {\n \"name\": \"pool-23\",\n \"prefix\": \"10.23.23.0/24\"\n },\n {\n \"name\": \"pool-24\",\n \"prefix\": \"10.24.24.0/24\"\n },\n {\n \"name\": \"pool-25\",\n \"prefix\": \"10.25.25.0/24\"\n },\n {\n \"name\": \"pool-26\",\n \"prefix\": \"10.26.26.0/24\"\n },\n {\n \"name\": \"pool-27\",\n \"prefix\": \"10.27.27.0/24\"\n },\n {\n \"name\": \"pool-28\",\n \"prefix\": \"10.28.28.0/24\"\n },\n {\n \"name\": \"pool-29\",\n \"prefix\": \"10.29.29.0/24\"\n },\n {\n \"name\": \"pool-30\",\n \"prefix\": \"10.30.30.0/24\"\n },\n {\n\"name\": \"pool-31\",\n\"prefix\": \"10.31.31.0/24\"\n },\n {\n \"name\": \"pool-32\",\n \"prefix\": \"10.32.32.0/24\"\n },\n {\n \"name\": \"pool-33\",\n \"prefix\": \"10.33.33.0/24\"\n }\n]\n}\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order" ] } }, "response": [] }, { "name": "04-Exec L3 Addr", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order/customers/network-operator/instances/l3-addr/exec", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order", "customers", "network-operator", "instances", "l3-addr", "exec" ] } }, "response": [] }, { "name": "05-Create Routing Resources", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"customer_id\": \"network-operator\",\n \"design_id\": \"routing\",\n \"instance_id\": \"routing-stuff\",\n \"operation\": \"create\",\n \"routing\": {\n \"autonomous_system\": [\n {\n \"name\": 65200,\n \"count\": 1024\n }\n ],\n \"spring\": {\n \"sids\": {\n \"size\": 1000\n }\n },\n \"route_reflector\": {\n \"clusters\": [\n {\n \"cluster\": \"10.1.1.1\"\n },\n {\n \"cluster\": \"10.2.2.2\"\n },\n {\n \"cluster\": \"10.3.3.3\"\n }\n ]\n }\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order" ] } }, "response": [] }, { "name": "06-Exec Routing Resources", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order/customers/network-operator/instances/routing-stuff/exec", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order", "customers", "network-operator", "instances", "routing-stuff", "exec" ] } }, "response": [] }, { "name": "07-Verify Resources", "event": [ { "listen": "prerequest", "script": { "exec": [ "var x=CryptoJS.enc.Utf8.parse(postman.getEnvironmentVariable(\"User\")+\":\"+postman.getEnvironmentVariable(\"Password\"));", "var authHeader=CryptoJS.enc.Base64.stringify(x);", "pm.request.headers.add({key: \"Authorization\", value: \"Basic \"+authHeader});", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/placement/network-elements", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "placement", "network-elements" ] } }, "response": [] } ] }
Table lists the APIs in the sample Postman collection file for onboarding devices.
REST API | Description | Reference in Collection File |
---|---|---|
Get Organization Details |
Get credentials for accessing an organization and the organization details. |
01-Who am I and get orgs |
Get Site |
Get the site where the device is to be installed and onboarded. |
02-pick-site |
Add L3 Address; see Sample REST API to Create an IPv4 Address Pool |
Create layer 3 (L3) address groups. |
03-Create L3 Addr |
Post L3 Address |
Save the L3 address groups in the database. |
04-Exec L3 Addr |
Add Routing Resources; see Sample REST API to Create BGP Cluster ID Pool |
Create BGP cluster groups. |
05-Create Routing Resources |
Post Routing Resources |
Save the BGP cluster groups in the database. |
06-Exec Routing Resources |
Get Resources |
Get the L3 address groups and BGP clusters that were created for verification. |
07-Verify Resources |
Sample REST API to Create an IPv4 Address Pool
The operation field in the JSON file can take up the following values:
-
create—Creates new network resources if none exist. However, if resources already exist, new network resources specified in the JSON file are added to the existing ones.
-
modify—Overrides the existing network resources with the values passed through the JSON file.
-
delete—Removes the network resources specified in the JSON file.
The following is a sample of the REST API to create an IPv4 address resource pool:
https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order" { "customer_id": "network-operator", "design_id": "l3-addr" "instance_id": "l3-addr", "operation": "create", "org_id": "<ORG>", "l3_addr": { "loopbacks": [{ "name": "range-192", "prefix": "10.10.192.0/18" }] "ipv4_prefixes": [{ "name": "pool-11", "prefix": "10.10.11.0/24 }, { "name": "pool-12", "prefix": "10.10.12.0/24" } ] } }
Sample REST API to Create BGP Cluster ID Pool
The operation field in the JSON file can take up the following values:
-
create—Creates new network resources if none exist. However, if resources already exist, new network resources specified in the JSON file are added to the existing ones.
-
modify—Overrides the existing network resources with the values passed through the JSON file.
-
delete—Removes the network resources specified in the JSON file.
The following is a sample of the REST API to create BGP cluster ID resource pool:
"https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order" { "customer_id": "network-operator", "design_id": "routing", "instance_id": "routing-stuff", "operation": "create", "routing": { "autonomous_system": [ { "name": 65200, "count": 1024 } ], "spring": { "sids": { "size": 1000 } }, "route_reflector": { "clusters": [ { "cluster": "192.168.1.1" }, { "cluster": "192.168.2.2" }, { "cluster": "192.168.3.3" } ] } } }
Sample Postman Collection File for Service Orchestration
The following is a sample of the Postman collection file to provision an L3VPN service in your network.
{ "info": { "_postman_id": "1bdacde8-64c9-4aaa-ae31-325aef127e44", "name": "Service Orchestration - L3VPN", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "829664" }, "item": [ { "name": "Create Topology - Step 1.1", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{User}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"customer_id\": \"l3vpn-topology-cid\",\n \"design_id\": \"topo\",\n \"instance_id\": \"l3vpn-topology-iid\",\n \"operation\": \"create\",\n \"topo\": {\n \"pop\": [\n {\n \"name\": \"6745739c-50dc-40b6-8ba1-72683d199362\",\n \"pe\": [\n {\n \"name\": \"00000000-0000-0000-1000-8828fb0ef680\",\n \"access\": [\n {\n \"name\": \"et-0/0/5\",\n \"type\": \"ethernet\",\n \"speed\": 10000,\n \"ce\": \"ce1\"\n }\n ],\n \"bandwidth\": 40000000,\n \"routes\": 100000,\n \"mac_addrs\": 1000000\n }\n ],\n \"postal_code_matches\": [\n {\n \"name\": \"SVL\",\n \"regex\": \"10...\"\n }\n ]\n },\n {\n \"name\": \"5e88fd56-7d15-4b92-965b-5fe6daf92f9d\",\n \"pe\": [\n {\n \"name\": \"00000000-0000-0000-1000-8828fb0f6e80\",\n \"access\": [\n {\n \"name\": \"et-0/0/5\",\n \"type\": \"ethernet\",\n \"speed\": 10000,\n \"ce\": \"ce2\"\n }\n ],\n \"bandwidth\": 40000000,\n \"routes\": 100000,\n \"mac_addrs\": 1000000\n }\n ],\n \"postal_code_matches\": [\n {\n \"name\": \"BNG\",\n \"regex\": \"20...\"\n }\n ]\n },\n {\n \"name\": \"627164c6-92a5-47f1-a0b1-eb2bf5bda04b\",\n \"pe\": [\n {\n \"name\": \"00000000-0000-0000-1000-485a0d56d018\",\n \"access\": [\n {\n \"name\": \"xe-0/0/0:1\",\n \"type\": \"ethernet\",\n \"speed\": 10000,\n \"ce\": \"ce4\"\n }\n ],\n \"bandwidth\": 40000000,\n \"routes\": 100000,\n \"mac_addrs\": 1000000\n }\n ],\n \"postal_code_matches\": [\n {\n \"name\": \"LAX\",\n \"regex\": \"30...\"\n }\n ]\n }\n ]\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order" ] } }, "response": [] }, { "name": "EXEC Topology Step 1.2", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{User}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order/customers/l3vpn-topology-cid/instances/l3vpn-topology-iid/exec", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order", "customers", "l3vpn-topology-cid", "instances", "l3vpn-topology-iid", "exec" ] } }, "response": [] }, { "name": "Create vpn resources Step 2.1", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{User}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"customer_id\": \"L3VPN-vpn\",\n \"design_id\": \"vpn\",\n \"instance_id\": \"vpn\",\n \"operation\": \"create\",\n \"vpn\": {\n \"route_distinguisher\": [\n {\n \"count\": 1024,\n \"name\": 1234\n },\n {\n \"count\": 1024,\n \"name\": 1235\n }\n ],\n \"route_target\": [\n {\n \"count\": 1024,\n \"name\": 1234\n },\n {\n \"count\": 1024,\n \"name\": 1235\n }\n ]\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order" ] } }, "response": [] }, { "name": "EXEC vpn resources Step 2.2", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{User}}", "type": "string" } ] }, "method": "POST", "header": [], "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order/customers/L3VPN-vpn/instances/vpn/exec", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "order", "customers", "L3VPN-vpn", "instances", "vpn", "exec" ] } }, "response": [] }, { "name": "Check Placement Resources 3 Copy", "request": { "auth": { "type": "basic", "basic": [ { "key": "password", "value": "{{Password}}", "type": "string" }, { "key": "username", "value": "{{User}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/placement/network-elements", "protocol": "https", "host": [ "{{server}}" ], "port": "{{port}}", "path": [ "service-orchestration", "api", "v1", "orgs", "{{ORG}}", "placement", "network-elements" ] } }, "response": [] } ] }
Table 2 lists the APIs in the sample collection file.
REST API |
Description |
Reference in the Collection File |
---|---|---|
Upload topology resources service order |
Create topology network resource pools for provisioning L3VPN service. |
Create Topology - Step 1.1 |
Execute topology resources service order |
Upload topology resource pools to the Paragon Automation database. |
EXEC Topology Step 1.2 |
Upload VPN resources service order |
Create VPN resource pools for provisioning L3VPN service. |
Create vpn resources Step 2.1 |
Execute VPN resources service order |
Upload VPN resource pools to the Paragon Automation database. |
EXEC vpn resources Step 2.2 |
View network resources for placement |
View available network resources to assign placement configurations for L3VPN service. |
Check Placement Resources 3 Copy |
Sample REST API to Create Topology Resources for L3VPN Service
The operation field in the JSON file can take up the following values:
-
create—Creates new network resources if none exist. However, if resources already exist, new network resources specified in the JSON file are added to the existing ones.
-
modify—Overrides the existing network resources with the values passed through the JSON file.
-
delete—Removes the network resources specified in the JSON file.
The following is a sample of the REST API to create topology resource pool for L3VPN service:
https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order # This file is a sample and not valid JSON. To use it, please: # 1. Remove all comments. (Comments begin with #) # 2. Change the file extension to .json. { "customer_id": "network-operator", "design_id": "topo", "instance_id": "topology", "operation": "create", "topo": { "pop": [ { "name": "e57ce4ee-9ef7-4e3c-a15d-66ab16d8f247", #this can be fetched from the sites page, see point 1 below (Site ID) "pe": [ { "access": [ { "ce": "ce1", #this is CE device reference "name": "ge-0/0/3", #this is the PE interface that connects to the CE device "speed": "100000", "type": "ethernet" } ], "bandwidth": "40000000000", "mac_addrs": "1000000", "name": "00000000-0000-0000-1000-2c6bf5efb500", #this can be fetched from the inventory page, see point 2 below (Device ID) "routes": "1000000" } ], "postal_code_matches": [ { "name": "M1", #User defined string, has to be unique within POPs "regex": "94..." #this is the regex for the postal codes this POP will accept } ] }, { "name": "3f6ae91b-02f8-4bf3-9d4c-8cbeaf832b2c", "pe": [ { "access": [ { "ce": "ce2", "name": "ge-0/0/3", "speed": "100000", "type": "ethernet" }, { "ce": "ce1", "name": "ge-0/0/4", "speed": "100000", "type": "ethernet" } ], "bandwidth": "40000000000", "mac_addrs": "1000000", "name": "00000000-0000-0000-1000-2c6bf5598200", "routes": "1000000" } ], "postal_code_matches": [ { "name": "M4", "regex": "91..." } ] } ] } } # 1. To get site ID, go to Inventory>Sites. If you don't see the ID column, click on the three dots above the table>Show/Hide columns and enable ID. # 2. To get device ID, go to Inventory>Network Inventory. If you don't see the ID column, click on the three dots above the table>Show/Hide columns and enable ID.
Sample REST API to Create VPN Resources for L3VPN Service
The operation field in the JSON file can take up the following values:
-
create—Creates new network resources if none exist. However, if resources already exist, new network resources specified in the JSON file are added to the existing ones.
-
modify—Overrides the existing network resources with the values passed through the JSON file.
-
delete—Removes the network resources specified in the JSON file.
The following is a sample of the REST API to create VPN resource pool for L3VPN service:
https://{{server}}:{{port}}/service-orchestration/api/v1/orgs/{{ORG}}/order { "customer_id": "network-operator", "design_id": "vpn", "instance_id": "rds-and-rts", "operation": "create", "vpn": { "route_distinguisher": [ { "count": 1024, "name": 1234 }, { "count": 1024, "name": 1235 } ], "route_target": [ { "count": 1024, "name": 1234 }, { "count": 1024, "name": 1235 } ] } }