ネットワークリソースプールの追加
ネットワークリソースプールは、IPv4ループバックアドレス、インターフェイスIPアドレス、セグメント識別子(SID)、BGPクラスタIDなど、ネットワーク内のデバイスに割り当てられるネットワークリソースの値を定義します。
Paragon Automationは、ネットワークリソースに対して自動設定が有効になっている場合、デバイスプロファイルとインターフェイスプロファイル内のネットワークリソースに値を割り当てます。
リソース共有元は、以下を使用して作成できます。
-
Paragon Automation UI。 GUI を使用したデバイスオンボーディング用のネットワーク リソース プールの追加を参照してください。
-
REST API。 「REST API を使用したネットワーク リソース プールの追加」を参照してください。
GUI を使用したデバイスオンボーディング用のネットワーク リソース プールの追加
Paragon Automation UIを使用して、デバイスオンボーディング用のネットワークリソースプールを追加するには、次の手順に従います。
リソースプールを定義した後、デバイスとインターフェイスのプロファイルをParagon Automationに追加できます。詳細については 、「デバイスプロファイルの追加 」および 「インターフェイスプロファイルの追加 」を参照してください。
GUI を使用した L3VPN サービスのネットワーク リソース プールの追加
Paragon Automation GUIを使用してL3VPNサービスのネットワークリソースを追加するには、次の手順に従います。
注文の実行ステータスと詳細なタスク ログを表示するには、 オーケストレーション > 監視 > ワークフローに移動します。「 [ワークフロー] ページについて」を参照してください。
REST APIを使用したネットワークリソースプールの追加
REST APIを使用してネットワークリソースプールを作成するには、Postmanなどのツールを使用してParagon AutomationにAPIリクエストを行う方法に精通している必要があります。
ネットワークリソースのリソースプールを作成するには、次のパラメータの値が必要になります。
-
Paragon Automationが実行されている環境のURL。
-
リソースプールを追加する組織のID。
-
組織にアクセスするためのユーザー名。
-
組織にアクセスするためのパスワード。
リソースプールを作成するには、次のようにします。
この手順では、Postman を使用して REST API を実行する方法について詳しく説明します。他のツールを使用して REST API を実行することもできます。
サンプルファイル
この項では、ネットワーク・リソース・プールの定義に使用できる環境ファイル、収集ファイル、およびREST APIのリストのサンプルを提供します。
- サンプル Postman 環境ファイル
- デバイスオンボーディング用のサンプルPostmanコレクションファイル
- IPv4 アドレスプールを作成するためのサンプル REST API
- BGP クラスタ ID プールを作成するための REST API のサンプル
- サービス オーケストレーション用のサンプル Postman コレクション ファイル
- L3VPN サービスのトポロジーリソースを作成するためのサンプル REST API
- L3VPN サービスの VPN リソースを作成するためのサンプル REST API
サンプル Postman 環境ファイル
以下は、サンプルの Postman 環境ファイルです。
{
"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"
デバイスオンボーディング用のサンプルPostmanコレクションファイル
以下は、IPv4 アドレスと BGP クラスター ID の値を定義するためのサンプルの Postman コレクション ファイルです。
{
"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": []
}
]
}
表 は、オンボード デバイス用のサンプル Postman コレクション ファイル内の API の一覧です。
| コレクション ファイルの | REST API | 記述 | リファレンス
|---|---|---|
| 組織の詳細を取得する |
組織にアクセスするための資格情報と組織の詳細を取得します。 |
01 -私は誰ですか、組織を取得する |
| サイトを取得 |
デバイスをインストールしてオンボードするサイトを取得します。 |
02-ピックサイト |
| L3アドレスを追加します。「IPv4 アドレスプールを作成するための REST API のサンプル」を参照してください |
レイヤー 3(L3)アドレス グループを作成します。 |
03 - L3アドレスの作成 |
| Post L3アドレス |
L3 アドレス グループをデータベースに保存します。 |
04-exec L3アドレス |
| ルーティングリソースを追加する。 BGP クラスタ ID プールを作成するための REST API のサンプルを参照してください。 |
BGP クラスタ グループを作成します。 |
05 - ルーティングリソースの作成 |
| ルーティング後のリソース |
BGP クラスタ グループをデータベースに保存します。 |
06-execルーティングリソース |
| リソースの入手 |
検証用に作成された L3 アドレス グループと BGP クラスタを取得します。 |
07-リソースの確認 |
IPv4 アドレスプールを作成するためのサンプル REST API
JSON ファイルの operation フィールドには、次の値を指定できます。
-
create:新しいネットワーク リソースが存在しない場合は作成します。ただし、リソースが既に存在する場合は、JSON ファイルで指定された新しいネットワーク リソースが既存のネットワーク リソースに追加されます。
-
変更—既存のネットワークリソースを、JSON ファイルを介して渡された値で上書きします。
-
delete:JSON ファイルで指定されたネットワーク リソースを削除します。
以下は、IPv4 アドレス リソース プールを作成するための REST API のサンプルです。
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"
}
]
}
}
BGP クラスタ ID プールを作成するための REST API のサンプル
JSON ファイルの operation フィールドには、次の値を指定できます。
-
create:新しいネットワーク リソースが存在しない場合は作成します。ただし、リソースが既に存在する場合は、JSON ファイルで指定された新しいネットワーク リソースが既存のネットワーク リソースに追加されます。
-
変更—既存のネットワークリソースを、JSON ファイルを介して渡された値で上書きします。
-
delete:JSON ファイルで指定されたネットワーク リソースを削除します。
以下は、BGP クラスター ID リソース プールを作成するための REST API のサンプルです。
"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"
}
]
}
}
}
サービス オーケストレーション用のサンプル Postman コレクション ファイル
次に、ネットワークに L3VPN サービスをプロビジョニングするための Postman コレクション ファイルの例を示します。
{
"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": []
}
]
}
表 2 は、サンプル・コレクション・ファイル内の API をリストしています。
| REST API |
形容 |
コレクション ファイル内の参照 |
|---|---|---|
| トポロジー・リソースのアップロード・サービス・オーダー |
L3VPNサービスをプロビジョニングするためのトポロジーネットワークリソースプールを作成します。 |
トポロジの作成 - ステップ 1.1 |
| トポロジー・リソース・サービス・オーダーの実行 |
トポロジーリソースプールをParagon Automationデータベースにアップロードします。 |
EXEC トポロジ ステップ 1.2 |
| VPNリソースのアップロードサービス注文 |
L3VPN サービスをプロビジョニングするための VPN リソースプールを作成します。 |
VPN リソースを作成する ステップ 2.1 |
| VPNリソースサービス注文の実行 |
VPNリソースプールをParagon Automationデータベースにアップロードします。 |
EXEC VPN リソース ステップ 2.2 |
| 配置するネットワークリソースの表示 | 使用可能なネットワーク リソースを表示して、L3VPN サービスの配置設定を割り当てます。 |
配置リソースの確認 3 コピー |
L3VPN サービスのトポロジーリソースを作成するためのサンプル REST API
JSON ファイルの operation フィールドには、次の値を指定できます。
-
create:新しいネットワーク リソースが存在しない場合は作成します。ただし、リソースが既に存在する場合は、JSON ファイルで指定された新しいネットワーク リソースが既存のネットワーク リソースに追加されます。
-
変更—既存のネットワークリソースを、JSON ファイルを介して渡された値で上書きします。
-
delete:JSON ファイルで指定されたネットワーク リソースを削除します。
次に、L3VPN サービスのトポロジーリソースプールを作成するための REST API の例を示します。
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.
L3VPN サービスの VPN リソースを作成するためのサンプル REST API
JSON ファイルの operation フィールドには、次の値を指定できます。
-
create:新しいネットワーク リソースが存在しない場合は作成します。ただし、リソースが既に存在する場合は、JSON ファイルで指定された新しいネットワーク リソースが既存のネットワーク リソースに追加されます。
-
変更—既存のネットワークリソースを、JSON ファイルを介して渡された値で上書きします。
-
delete:JSON ファイルで指定されたネットワーク リソースを削除します。
次に、L3VPN サービスの VPN リソース プールを作成するための REST API の例を示します。
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
}
]
}
}