LAG
Configures, modifies, and retrieves LAG configurations. The URI to configure data for LAG is:
restconf/data/interfaces/interface
Supported HTTP Operations
URL: https://<host>/restconf/data/interfaces
Request body: {
"interface": [
{
"name": "lag 14",
"config": {
"name": "lag 14",
"type": "iana-if-type:ieee8023adLag",
"enabled": true
},
"openconfig-if-aggregate:aggregation": {
"config": {
"lag-type": "STATIC",
"openconfig-if-aggregate-aug:lag-name": "green"
}
}
}
]
}
Response body: None
The following example create a dynamic(LACP) LAG using POST method.
Request body:
{
"interface": [
{
"name": "lag 15",
"config": {
"name": "lag 15",
"type": "iana-if-type:ieee8023adLag",
"enabled": true
},
"openconfig-if-aggregate:aggregation": {
"config": {
"lag-type": "LACP",
"openconfig-if-aggregate-aug:lag-name": "black"
}
}
}
]
}
Response body: Created
URL: https://<host>/restconf/data/interfaces
Request body:
{
"interfaces": {
"interface": [
{
"name": "lag 6",
"config": {
"name": "lag 6",
"type": "iana-if-type:ieee8023adLag",
"enabled": true
},
"openconfig-if-aggregate:aggregation": {
"config": {
"lag-type": "STATIC",
"openconfig-if-aggregate-aug:lag-name": "black"
}
}
}
]
}
}
Response body: None
The
following example create a dynamic(LACP) LAG using PATCH
method.Request body:
{
"interfaces": {
"interface": [
{
"name": "lag 10",
"config": {
"name": "lag 10",
"type": "iana-if-type:ieee8023adLag",
"enabled": true
},
"openconfig-if-aggregate:aggregation": {
"config": {
"lag-type": "LACP",
"openconfig-if-aggregate-aug:lag-name": "RED"
}
}
}
]
}
}
Response body: None
URL: https://<host>/restconf/data/interfaces/interface
Request body: None
Response body: {
"openconfig-interfaces:interface": [
{
"name": "lag 11",
"config": {
"name": "lag 11",
"type": "iana-if-type:ieee8023adLag",
"enabled": false
},
"state": {
"name": "lag 11",
"type": "iana-if-type:ethernetCsmacd",
"description": "",
"enabled": true,
"ifindex": 3083,
"admin-status": "UP",
"oper-status": "DOWN",
"counters": {
"in-octets": "0",
"in-pkts": "0",
"in-unicast-pkts": "0",
"in-broadcast-pkts": "0",
"in-multicast-pkts": "0",
"in-discards": "0",
"in-errors": "0",
"in-unknown-protos": "0",
"in-fcs-errors": "0",
"out-octets": "0",
"out-pkts": "0",
"out-unicast-pkts": "0",
"out-broadcast-pkts": "0",
"out-multicast-pkts": "0",
"out-discards": "0",
"out-errors": "0"
}
},
"openconfig-if-aggregate:aggregation": {
"config": {
"lag-type": "STATIC",
"openconfig-if-aggregate-aug:lag-name": "change"
},
"state": {},
"openconfig-vlan:switched-vlan": {
"state": {}
}
}
}
]
}
URL: https://<host>/restconf/data/interfaces/interface/lag%d
Request body: None Response body: None
Adding ports to LAG using PATCH method.
URL: https://<host>/restconf/data/interfaces/interface/ethernet1%2F1%2F2/ethernet/config
Request body: {
"config": {
"openconfig-if-aggregate:aggregate-id": "lag 7"
}
}
Response body: None
To edit a LAG name using PATCH method.
URL: https://<host>/restconf/data/interfaces/interface/lag 14/aggregation/config/lag-name
Request body:
{
"openconfig-if-aggregate-aug:lag-name": "red"
}
Response body: NoneTo
add GET after editing a LAG
name.URL: https://<host>/restconf/data/interfaces/interface/lag 14/aggregation/config/lag-name
Request body: None
Response body:
{
"openconfig-if-aggregate-aug:lag-name": "green"
}
DELETE
method to remove ports from
LAG.URL: https://<host>/restconf/data/interfaces/interface/ethernet3%2F1%2F6/ethernet/config/aggregate-id
Request body: None Response body: None