cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1187
Views
0
Helpful
3
Replies

Viptela vManage NED REST/RESTCONF

mmalysz
Cisco Employee
Cisco Employee

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 ~]$

 

3 Replies 3

lmanor
Cisco Employee
Cisco Employee

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

 

Thanks - It was a good idea to use module name and not prefix.

But I have another problem...

Now the call to

https://127.0.0.1:8888/restconf/data/devices/device=org3-vmanage-2/live-status/tailf-ned-viptela-vmanage-stats:exec/get_vedges

Works fine, however I am not able to use the filters..

I did use yanger to produce swagger specs

Zrzut ekranu 2019-06-23 o 13.06.34.png

 

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"
}
]
}
}

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