cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
866
Views
0
Helpful
3
Replies

Can you find the yang model file with the URN?

Difan Zhao
Level 5
Level 5

Hi, happy holidays

I am new to the development world and I am studying the automation on Cisco. I have studied materials I found on Google about Yang and Netconf. I am able to follow instructions to do simple communications. One question I can't seem to find answer on is whether I can find the Yang file by the URN. 

To be more specific, I use ncclient to talk to the router. I got a list of capabilities and one is called

urn:ietf:params:xml:ns:yang:ietf-interfaces?module=ietf-interfaces&revision=2014-05-08&features=pre-provisioning,if-mib,arbitrary-names

I want to find the module and see its structure with pyang (unless there is a better way to view it). I have used git to download the whole yang module repo. Now, what's the best way to find the file? find ./ -name "*ietf-interfaces*" gives me a big list. Is there a way to find the exact Yang model file with the urn, or am I completely wrong with the process? Thanks!

1 Accepted Solution

Accepted Solutions

yep understood ..

Should I find the right folder based on the platform (IOSXE, XR, ...etc) and the version (16.9, 17.3, ...etc) then go through the modules in that folder?

 

That's how I do it .. 

View solution in original post

3 Replies 3

omz
VIP Alumni
VIP Alumni

Hi 

If I understand correctly .. do you mean you have downloaded all the Yang Models and looking for module=ietf-interfaces in those models?

So the find output looks similar to this .. ?

https://github.com/YangModels/yang/search?q=module%3Dietf-interfaces

 

Hey OMZ, I cloned the library and I did the search on my ubuntu box but I think it is essentially the same as searching on the git webpage. 

 

So either way, the search would return multiple results. They are not symbolic ones to the one in the standard ietf folder. That means, to my understanding, multiple individual ietf-interfaces modules have the same URN. I thought that the URN should uniquely identify one module. Isn't it conflicting with the Yang standard?

 

Anyway, for a guy looking for a way to do automation with Netconf with the Yang data models, what is the right process? Should I find the right folder based on the platform (IOSXE, XR, ...etc) and the version (16.9, 17.3, ...etc) then go through the modules in that folder?

 

Thanks,

Difan

yep understood ..

Should I find the right folder based on the platform (IOSXE, XR, ...etc) and the version (16.9, 17.3, ...etc) then go through the modules in that folder?

 

That's how I do it ..