-
Notifications
You must be signed in to change notification settings - Fork 1
Restconf API from YANG Model
jensenzhang edited this page Oct 26, 2017
·
1 revision
Request
POST /restconf/operations/alto-bwmonitor:bwmonitor-subscribe HTTP/1.1
Host: alto.example.com:8181
Accept: application/json
Content-type: application/json
{
"input": {
"port-id": [
"openflow1:1",
"openflow1:2",
"openflow2:1",
"openflow3:1"
]
}
}
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"output": {
"result": true
}
}
Request
GET /restconf/operational/alto-bwmonitor:speeds/port/openflow1:1 HTTP/1.1
Host: alto.example.com:8181
Accept: application/json
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"port-id": "openflow1:1",
"rx-speed": 128000000,
"tx-speed": 128000000,
"avail-bw": 9000000,
"capacity": 10000000
}
Request
POST /restconf/operations/alto-bwmonitor:bwmonitor-unsubscribe HTTP/1.1
Host: alto.example.com:8181
Accept: application/json
Content-type: application/json
{
"input": {
"port-id": [
"openflow1:1"
]
}
}
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"output": {
"result": true
}
}
Request
POST /restconf/operations/alto-bwmonitor:bwmonitor-query HTTP/1.1
Host: alto.example.com:8181
Accept: application/json
Content-type: application/json
{
"input": {
"port-id": [
"openflow2:1",
"openflow3:1"
]
}
}
Response
HTTP/1.1 200 OK
Content-type: application/json
{
"output": {
"port-speed": [
{
"port-id": "openflow2:1",
"rx-speed": 128000000,
"tx-speed": 128000,
"avail-bw": 9000000,
"capacity": 10000000
},
{
"port-id": "openflow3:1",
"rx-speed": 0,
"tx-speed": 0,
"avail-bw": 1000000,
"capacity": 10000000
}
]
}
}