カスタム仮想インターフェース
このセクションでは、カスタム仮想インターフェースでサポートされている以下の操作について説明します。
nfa1000
このセクションでは、カスタム仮想インターフェースでサポートされている以下の操作について説明します。
カスタム仮想インターフェースの追加
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces/com.ca.nfa.odata.createCustomVirtualInterface
メソッド
POST
ペイロード
{ "InterfaceId" : <Enter a valid ID>, "Name" : "<Name of the Interface Aggregation>", "Description" : "<Description of the interface Aggregation>", "IfType" : "<Custom Virtual Interface Type>", "InSpeed" : <Inspeed value> , "OutSpeed" : <Outspeed Value>, "Subnet" :<Subnet value> }
例 1: 1 つのサブネットの追加
サンプル リクエスト
サブネットが 1 つあるカスタム仮想インターフェースを作成します。
http://127.0.0.1:8981/odata/api/interfaces/com.ca.nfa.odata.createCustomVirtualInterface
メソッド
POST
サンプル ペイロード
{"InterfaceId" : 11,"Name" : "testCVI","Description" : "CVI","IfType" : "WAN","InSpeed" : 10 ,"OutSpeed" : 11 ,"Subnet" :["10.0.0.4/22"]}
サンプル レスポンス:
{"@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)","value": [{"ID": 537,"AgentType": "Virtual","RouterAddress": "127.0.0.1","Description": "CVI","InSpeed": 10,"OutSpeed": 11,"IfIndex": 0,"PersistentIfIndex": 2147483729,"IfType": "WAN","UpdatedOn": 1546247778,"Enabled": "Y","LastData": 0,"HarvesterAddress": "127.0.0.1","Name": "testCVI"}]}
例 2: 複数のサブネットの追加
サンプル リクエスト
サブネットが複数あるカスタム仮想インターフェースを作成します。
http://127.0.0.1:8981/odata/api/interfaces/com.ca.nfa.odata.createCustomVirtualInterface
メソッド
POST
サンプル ペイロード
{ "InterfaceId" : 12, "Name" : "testCVI1", "Description" : "CVI", "IfType" : "WAN", "InSpeed" : 10 , "OutSpeed" : 11 , "Subnet" :[ "10.0.0.4/22", "10.0.0.9/3", "10.0.0.9/22" ] }
サンプル レスポンス:
{ "@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)", "value": [ { "ID": 11, "AgentType": "Virtual", "RouterAddress": "127.0.0.1", "RouterId": null, "Description": "CVI", "InSpeed": 1391671, "OutSpeed": 14393, "IfIndex": 0, "PersistentIfIndex": 2147483653, "IfType": "WAN-ATM", "UpdatedOn": 1603098194, "Enabled": "N", "LastData": 0, "HarvesterAddress": "127.0.0.1", "Name": "testCVI", "TrafficStatus": null, "DomainId": null, "DomainName": null, "Subnet": [], "ComponentAgentIds": [] } ] }
カスタム仮想インターフェースの取得
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces?$filter= contains(AgentType,'Virtual')
サンプル リクエスト
http://127.0.0.1:8981/odata/api/interfaces?$filter= contains(AgentType,'Virtual')
メソッド
GET
サンプル レスポンス:
{ "@odata.context": "http://localhost:8981/odata/api/$metadata#interfaces(ID,AgentType,RouterAddress,Description,InSpeed,OutSpeed,IfIndex,PersistentIfIndex,IfType,UpdatedOn,Enabled,LastData,HarvesterAddress,Name,TrafficStatus,DomainId,DomainName,Subnet,ComponentAgentIds)", "value": [ { "InSpeed": 2000000, "IfType": "WAN", "Description": "interface updatemani", "PersistentIfIndex": 2147483650, "Enabled": "Y", "RouterAddress": "10.0.40.33", "Name": "Interface -edit apimani", "AgentType": "Virtual", "DomainId": 1, "LastData": 0, "OutSpeed": 20000000, "IfIndex": 0, "UpdatedOn": 1600937363, "ID": 185, "HarvesterAddress": "10.74.241.110", "TrafficStatus": "Red", "DomainName": "Default Domain", "Subnet": [ "1.1.1.0/24" ], "ComponentAgentIds": [], } ], }
カスタム仮想インターフェースの編集
リソース
URI http://<nfa odata host>:<nfa odata port>/odata/api/interfaces(<CustomVirtualInterface_ID>)
サンプル リクエスト
http://127.0.0.1:8981/odata/api/interfaces(185)
メソッド
PATCH
サンプル ペイロード
{ "Name": "Interface-edit2", "Subnet": [ "1.1.1.0/24", "10.10.10.10/24" ] }
サンプル レスポンス
この API に対するレスポンスはありません。
カスタム仮想インターフェースの削除
既存のインターフェース削除 API を使用することで、カスタム仮想インターフェースを削除できます。詳細については、以下の API を参照してください。