10-24-2020 10:27 PM
I am trying to repurpose a working script that Gets IOS XE Static Route (ietf-routing:routing) information. The new script is going to pull OSPF info using the "Cisco-IOS-XE-ospf-oper" module.
I am running into issue with the new script. When I attempt to request some of the objects within the OSPF module I receive an Indices Error. Looking that the data type being returned it is a standard List. In the working script the data is returned as a Dictionary.
Since both modules conform to Yang and are returned in JSON why would one return as List and the other as Dictionary? Obviously I am hoping for the OSPF module to be returned as a dictionary.
Still cutting my teeth when it comes to Python and Restconf so any pointers or tips would be greatly appreciated.
Kevin
11-01-2020 02:13 AM
The main issue that is related to NETCONF/YANG environments is the actual defined data model, created via YANG. Different devices support different YANG models for the same or similar operations.
Check for supported models for the device - https://github.com/YangModels/yang/tree/master/vendor/cisco
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