03-02-2021 10:42 AM
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
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
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
Solved! Go to Solution.
03-08-2021 05:06 AM - edited 03-08-2021 05:07 AM
@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.
03-02-2021 10:50 AM
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.
03-03-2021 05:42 AM
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
03-03-2021 10:28 AM
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
03-08-2021 05:06 AM - edited 03-08-2021 05:07 AM
@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.
03-09-2021 08:34 AM
thanks for your help
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