06-16-2019 12:51 PM
Dear,
I am trying to call REST or RESTCONF to viptela vManage NED...
Via the CLI I am getting expected output from the following command:
mmalysz@ncs> request devices device org3-vmanage-2 live-status vmanage-stats:exec get_vedges | more result success response [ { "deviceType": "vedge", "hardwareCertSerialNumber": "NA"
However via REST/RESTCONF I am getting:
[mmalysz@nso9-w ~]$ curl -k -u xxx:xxx -X POST https://127.0.0.1:8888/api/running/devices/device/org3-vmanage-2/live-status/vmanage-stats:exec/_operations/get_vedges <errors xmlns="http://tail-f.com/ns/tailf-rest-error"> <error> <error-tag>malformed-message</error-tag> <error-message>config false action in running datastore</error-message> </error> </errors>
For RESTCONF I am trying out following path (but it seems I get something wrong)
[mmalysz@nso9-w ~]$ curl -k -u admin:C1sco123! -X POST https://127.0.0.1:8888/restconf/data/devices/device=org3-vmanage-2/live-status/vmanage-stats:exec/get_vedges <errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <error> <error-message>uri keypath not found</error-message> <error-tag>invalid-value</error-tag> <error-type>application</error-type> </error> </errors> [mmalysz@nso9-w ~]$
06-20-2019 01:04 AM - edited 06-20-2019 01:21 AM
Hello,
For restconf, please try the module name, tailf-ned-viptela-vmanage-stats, in place of the prefix, vmanage-stats, for the 'exec' namespace:
curl -k -u admin:C1sco123! -X POST https://127.0.0.1:8888/restconf/data/devices/device=org3-vmanage-2/live-status/tailf-ned-viptela-vmanage-stats:exec/get_vedges
06-23-2019 04:11 AM
Thanks - It was a good idea to use module name and not prefix.
But I have another problem...
Now the call to
Works fine, however I am not able to use the filters..
I did use yanger to produce swagger specs
But when I try to call it with the body:
{
"tailf-ned-viptela-vmanage-stats:filter": "state:csrgenerated",
"tailf-ned-viptela-vmanage-stats:columns": "uuid,vedgeCSR"
}
I am getting error:
{
"errors": {
"error": [
{
"error-message": "container filter not allowed here",
"error-path": "/tailf-ncs:devices/device=org3-vmanage-2/live-status/tailf-ned-viptela-vmanage-stats:exec/get_vedges",
"error-tag": "malformed-message",
"error-type": "application"
}
]
}
}
06-24-2019 10:58 AM
Note that /devices need to use the module name as well, i.e. /tailf-ncs:devices.
curl -k -u admin:C1sco123! -X POST https://127.0.0.1:8888/restconf/data/tailf-ncs:devices/device=org3-vmanage-2/live-status/tailf-ned-viptela-vmanage-stats:exec/get_vedges
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide