- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2020 04:32 PM
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!
Solved! Go to Solution.
- Labels:
-
YANG Development Kit (YDK)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2020 04:38 AM
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 ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 06:52 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2020 11:52 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2020 04:38 AM
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 ..
