12-08-2017 05:58 AM - edited 03-01-2019 04:03 AM
I might be asking sth. really easy here (and I may just have forgotten about how to do it). But here we go:
How can I issue simple show commands to a device and pick up the info the device gives me upon that show command?
Is this possible via JSON RPC or REST API...or can it be done from NSO CLI?
For example. How would I issue a simple "show version" command utilizing NSO's capabilities (CLI, APIs or other ways)?
Thanks for the help/refresher.
Solved! Go to Solution.
12-08-2017 07:10 AM
CLI: request devices device volvo-fw-router-ASA-firewall-esc0-1 live-status asa-stats:exec any args show version
REST:
curl -v -H "Content-Type:application/vnd.yang.data+xml" -u admin:admin -d "<any><args>show version</args></any>" http://localhost:8080/api/operational/devices/device/volvo-fw-router-ASA-firewall-esc0-1/live-status/asa-stats:exec/_operations/any
12-08-2017 07:10 AM
CLI: request devices device volvo-fw-router-ASA-firewall-esc0-1 live-status asa-stats:exec any args show version
REST:
curl -v -H "Content-Type:application/vnd.yang.data+xml" -u admin:admin -d "<any><args>show version</args></any>" http://localhost:8080/api/operational/devices/device/volvo-fw-router-ASA-firewall-esc0-1/live-status/asa-stats:exec/_operations/any
12-08-2017 07:19 AM
Great...thanks a lot...that is just what I needed/couldn't remember. I thought it might be faster to ask here than to search through the API docs (which I personally find quite unwieldy for quick reference).
Thanks a lot!!!
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