05-09-2017 07:14 AM - edited 03-01-2019 03:48 AM
All ,
I’m working through setting up a web portal for a pre-pilot demo.
I’m looking for any general guidance in how to verify success.
Example:
When executing template.apply() , I don’t see any return value.
So if a device happens to be out of sync , there is no indication I can find other then an NSO console message.
Just trying to figure out how to provide some feedback to the web portal.
05-09-2017 07:15 AM
Yes when you return from template apply, this is still very eraly in the overall transaction, you code has just been called to help fastmap compute the set of config changes on the device but the device has not been touched.
There is no way then that you can use the service callback for the pupose of giving feedbackon a commit becauae it returns well before the commit is started.
However if a deivce is out of sync the commit will abort (default behavior) and there should be feedback in the web portal.
05-09-2017 07:15 AM
That is right. Errors that occur during commit (i.e. device/NED errors, out of sync, etc.) are reflected through the API.
If you use REST, these errors are returned as HTTP error codes which you should be able to catch in your code. Those are documented in the NSO northbound guide. I believe the NSO Web UI guide should have similar documentation for JSON-RPC.
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