01-31-2020 09:24 AM
Hi developers,
For the new project, I'll have to deviate from NSO orchestration functions a little bit - the requirement is not only to deploy services, but also validate their operation. And yes, we could use any external custom-built system for that, but why duplicate things, while most of the required data is inside the NSO. That's how I found a feature called 'live-status', which triggers NED 'stats' module to retrieve some operational data (and of course, many f-words were spoken here, trying to find just anything in the documentation).
So my basic questions are:
1) How to trigger live-status from Python code?
I've found one quite good explanation in the forum, so let's consider that as explained a little:
2) How to trigger live-status from API?
I probably should use POST over some never documented URI, something like:
http://{{NSO_IP}}:{{NSO_HTTP_PORT}}/restconf/data/tailf-ncs:devices/device=NX_LEAF111/live-status/tailf-ned-cisco-nx-stats:exec/any
However what should be put inside the body is still unknown to me, so I get:
"error-message": "External error in the NED implementation for device NX_LEAF111: missing argument(s) for subcmd=any",
3) Can we augment the NED stats tree with own fields, populated with values read from device with my own callback code?
thanks,
robert
Solved! Go to Solution.
02-03-2020 01:17 PM
So you need to provide the 'input' to the action - here is a RESTCONF example from IOS-XR, XE should be same:
02-03-2020 09:27 AM
Hi!
Yes, the exec live status is a wonderful feature that is often not talked about enough.
I don't have a RESTCONF example handy, though I have a Python one:
https://github.com/NSO-developer/nso-5-day-training/blob/master/nso_python_api_examples.py#L134
Also if you are looking for other restconf examples, I made this postman collection:
https://github.com/NSO-developer/cisco-nso-postman
(though I admit it does not have the live status, I plan to add it soon)
02-03-2020 01:17 PM
So you need to provide the 'input' to the action - here is a RESTCONF example from IOS-XR, XE should be same:
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