cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
622
Views
0
Helpful
1
Replies

IOS XE Rest API Request List Indices Error

Craigke87
Level 1
Level 1

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

1 Reply 1

omz
VIP Alumni
VIP Alumni

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