cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4135
Views
15
Helpful
5
Replies

restconf problem with model Cisco-IOS-XE-ospf

rober1986
Level 1
Level 1

I have been trying to use the model Cisco-IOS-XE-ospf but i was not able to complete the request, I got the error uri keypath not found"

 

I'm going to add two exaple of url , the Cisco-IOS-XE-ospf-ope models work without any issue but the Cisco-IOS-XE-ospf always give me issues.

 

for example if I use this Url

https://192.168.1.247/restconf/data/Cisco-IOS-XE-ospf:router-ospf

ospf-xe.JPG

 

but if I use this UrL:

https://192.168.1.247/restconf/data/Cisco-IOS-XE-ospf-oper:ospf-oper-data

I use the same syntax for create the url and on that URL and  I don't have any issue

ospf-ope.JPG

 

I'm not sure if the problem is the augment field that show me the pyang output

 

please your help with this issue

 

regards

Roberto

1 Accepted Solution

Accepted Solutions

@rober1986 the native models for IOS-XE, including OSPF, are designed in a way that they augment the base "native" model.  This makes it easier to maintain and develop models for individual features by having them independent, while keeping the use of the models for the developer also consistent and easy, all building from a common path when making queries.  

 

So yes, to make use of features from the OSPF model, you will access it "through" the native model.  

 

I talk a bit about model augmentation in this blog post: https://blogs.cisco.com/developer/restconf-url-creation . Take a read and see if that helps. 

View solution in original post

5 Replies 5

rober1986
Level 1
Level 1

Hi @hapresto , can you please help me with this question?, i have been looking for a solution on the forum but I dont find it

i have been trying yo use the model Cisco-IOS-XE-ospf, if I use the native model I don't have any issue. 

 

Hello @rober1986

The IOS XE Native configuration models are setup to all build from the "native" model.  That's what the "augment" field indicates.  To find the OSPF configuration, start from there.  The URL will be something like "/restconf/data/Cisco-IOS-XE-native:native/router".  If your device has more than one routing protocol configured, you'll likely see details for them all.  Otherwise you'll get the OSPF details.  

 

Hope that helps

Hank

hi @hapresto ,just one last question, 

so it's not possible to use directly the model Cisco-IOS-XE-ospf.yang,  do we have to always use the native model?

what I understand  the model Cisco-IOS-XE-ospf.yang its only use for create the native model

 

regards

Roberto

@rober1986 the native models for IOS-XE, including OSPF, are designed in a way that they augment the base "native" model.  This makes it easier to maintain and develop models for individual features by having them independent, while keeping the use of the models for the developer also consistent and easy, all building from a common path when making queries.  

 

So yes, to make use of features from the OSPF model, you will access it "through" the native model.  

 

I talk a bit about model augmentation in this blog post: https://blogs.cisco.com/developer/restconf-url-creation . Take a read and see if that helps. 

thanks for your help 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: