Agrégations d'interface

Cette section décrit les opérations prises en charge ci-dessous au niveau des agrégations d'interface.
nfa1000
Cette section décrit les opérations prises en charge ci-dessous au niveau des agrégations d'interface.
Ajout d'une agrégation d'interface
URI de la ressource
http://<nfa odata host>:<nfa odata port>/odata/api/interfaces/com.ca.nfa.odata.createInterfaceAggregation
Méthode
POST
Charge utile
{ "InterfaceIds" : [<Enter a valid ID>], "Name" : "<Name of the Interface Aggregation>", "Description" : "<Description of the interface Aggregation>", "IfType" : "<Interface Aggregation Type>", "InSpeed" : <Inspeed value> , "OutSpeed" : <Outspeed Value> }
Vous pouvez également saisir plusieurs valeurs InterfaceId en les séparant par une virgule (,) et en les entourant de crochets.
Exemple 1 : ajout d'une seule valeur InterfaceId
Exemple de demande
Cet exemple illustre une valeur unique pour InterfaceId.
http://127.0.0.1:8981/odata/api/interfaces/com.ca.nfa.odata.createInterfaceAggregation
Méthode
POST
Exemple de charge utile
{
"InterfaceIds" : [446],
"Name" : "test1",
"Description" : "test",
"IfType" : "WAN",
"InSpeed" : 10 ,
"OutSpeed" : 11
}
Exemple 2 : ajout de plusieurs valeurs InterfaceId
Exemple de demande
Cet exemple illustre plusieurs valeurs
InterfaceId
.
http://127.0.0.1:8981/odata/api/interfaces/com.ca.nfa.odata.createInterfaceAggregation
Exemple de charge utile
{
"InterfaceIds" : [447,673,224],
"Name" : "test2",
"Description" : "test2",
"IfType" : "WAN",
"InSpeed" : 10 ,
"OutSpeed" : 11
}
Exemple de réponse
{
"@odata.context": "$metadata#Collection(com.ca.nfa.odata.interfaces)",
"value": [
{
"ID": 255,
"AgentType": "Aggregate",
"RouterAddress": "127.0.0.1",
"Description": "Description interface Aggregation2",
"InSpeed": 100000,
"OutSpeed": 1000,
"IfIndex": 255,
"PersistentIfIndex": 255,
"IfType": "WAN",
"UpdatedOn": 1554274019,
"Enabled": "Y",
"LastData": 0,
"HarvesterAddress": "127.0.0.1",
"Name": "Interface Aggregation10"
}
]
}
Obtenir les agrégations d'interface
URI
http://<nfa odata host>:<nfa odata port>/odata/api/interfaces?$filter=contains(AgentType, 'Aggregate')
Méthode
GET
Exemple de demande
http://127.0.0.1:8981/odata/api/interfaces?$filter=contains(AgentType, 'Aggregate')
Exemple de réponse
{ "@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": 1, "IfType": "WAN", "Description": "", "PersistentIfIndex": 188, "Enabled": "Y", "RouterAddress": "0.0.0.1", "Name": "test", "AgentType": "Aggregate", "DomainId": 1, "LastData": 0, "OutSpeed": 1, "IfIndex": 188, "UpdatedOn": 1601359065, "ID": 188, "HarvesterAddress": "10.74.241.110", "TrafficStatus": "Red", "DomainName": "Default Domain", "Subnet": [], "ComponentAgentIds": [ 153, 154 ] } ] }
La propriété ComponentAgentIds avec les ID d'interface enfant est ajoutée aux agrégations d'interface.
Obtenir une agrégation d'interface unique
URI
http://<nfa odata host>:<nfa odata port>/odata/api/interfaces(<interfaceaggregationid>)
Méthode
GET
Exemple de demande
http://127.0.0.1:8981/odata/api/interfaces(188)
Exemple de réponse
{ "@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)/$entity", "InSpeed": 1, "IfType": "WAN", "Description": "", "PersistentIfIndex": 188, "Enabled": "Y", "RouterAddress": "0.0.0.1", "Name": "test", "AgentType": "Aggregate", "DomainId": 1, "LastData": 0, "OutSpeed": 1, "IfIndex": 188, "UpdatedOn": 1601359065, "ID": 188, "HarvesterAddress": "10.74.241.110", "TrafficStatus": "Red", "DomainName": "Default Domain", "Subnet": [], "ComponentAgentIds": [ 153, 154 ] }
Modifier l'agrégation d'interface
Cette API a été améliorée pour modifier les ComponentAgentIds pour l'entité d'agrégation d'interface unique. Cette fonctionnalité n'est pas prise en charge pour la modification d'interface en bloc.
URI
http://<nfa odata host>:<nfa odata port>/odata/api/interfaces(<interfaceaggregationid>)
Méthode
PATCH
Exemple de demande
http://127.0.0.1:8981/odata/api/interfaces(188)
Exemple de charge utile
{ "Description": "aggregate interface update", "Name": "Interface aggregate", "InSpeed": 2000000, "OutSpeed": 20000000, "IfType": "WAN", "DomainId":1, "ComponentAgentIds": [ 153 ] }
Exemple de réponse
Cette API ne renvoie aucune réponse.
Supprimer l'agrégation d'interface
Les agrégations d'interface peuvent être supprimées à l'aide des API de suppression d'interfaces existantes. Pour plus d'informations, consultez les API suivantes :