Subject: [netmod] Place to download Standard YANG Modules ?

From: Balazs Lengyel <[email-masked]>
Date: Mon, 8 Oct 2018 14:37:44 +0200

Hello,

What is the best way to download standard Yang Modules? I know the 
official answer is to download all the standards then extract the 
modules, however this is a "bit" cumbersome. Is there any better way? We 
had a git earlier. How up to date is that?

It would be wonderful if this could be described in the Netmod WG wiki.

(And sorry, no but I am not volunteering :-(   )

regards Balazs

-- 
Balazs Lengyel                       Ericsson Hungary Ltd.
Senior Specialist
Mobile: +36-70-330-7909              email: [email-masked]

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 08 Oct 2018 14:53:13 +0200 (CEST)

Hi,

Balazs Lengyel <[email-masked]> wrote:
> modules, however this is a "bit" cumbersome. Is there any better way?
> We had a git earlier. How up to date is that?

You can download them from IANA:

https://www.iana.org/assignments/yang-parameters/yang-parameters.xhtml

But there are two problems:

 1) you have to download one at the time
 2) some of them have lost all indentation
    (e.g. https://www.iana.org/assignments/yang-parameters/[email-masked])

[on 2), I have it on my list to talk to them]

Or you can get them from some 3rd party place like yang-catalog, or
pyang.

/martin

---

From: Balázs Lengyel <[email-masked]>
Date: Mon, 8 Oct 2018 13:23:45 +0000

Hello Martin,

Thanks for the info.

Yang-Catalog does not allow the download of modules. AFAIK it only gives 
you metadata about the modules.
You mentioned download from pyang. How does that work?

I used https://github.com/YangModels/yang for some time, but I don't 
know how up to date that is.

regards

---

From: Lou Berger <[email-masked]>
Date: Mon, 8 Oct 2018 09:55:01 -0400

> know how up to date that is.

It's not too bad.  just checked an it's just missing one RFC'ed model 
(standard/ietf/RFC/[email-masked]) and I just put in a PR 
for it.

(I have a cron job that auto generates branches to be merged, but do the 
PRs manually, see https://github.com/louberger/yang if interested.)

Lou

>>> _______________________________________________
>>> netmod mailing list
>>> [email-masked]
>>> https://www.ietf.org/mailman/listinfo/netmod

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 08 Oct 2018 19:29:08 +0200 (CEST)

Balázs Lengyel <[email-masked]> wrote:
> Hello Martin,
> 
> Thanks for the info.
> 
> Yang-Catalog does not allow the download of modules. AFAIK it only
> gives you metadata about the modules.

I just meant that the pyang github repo contains the published IETF
YANG models.

/martin

---

From: Jernej Tuljak <[email-masked]>
Date: Wed, 10 Oct 2018 09:52:48 +0200

> [on 2), I have it on my list to talk to them]

If you do talk to them, also mention that 
"[email-masked]" in their list is actually 
just "[email-masked]" renamed, and that 
"[email-masked]" does not have the same revision as the 
module that is part of RFC8366 (2018-05-09). Also, in at least two 
instances, I managed to somehow download a blank module file, which then 
magically downloaded properly after a retry.

Benoit went through the trouble of gathering modules from different 
sources and his blog entry includes standard modules [1]. I dare say 
that this blog entry is a much more reliable source compared to the IANA 
site.

[1] - https://www.claise.be/2018/06/ietf-yang-modules-statistiques/

> Or you can get them from some 3rd party place like yang-catalog, or

Pyang git repo has the files without revisions in their name, which is 
somewhat awkward.

Jernej

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 11 Oct 2018 08:51:31 +0200 (CEST)

Jernej Tuljak <[email-masked]> wrote:
> "[email-masked]" in their list is
> actually just "[email-masked]" renamed, and
> that "[email-masked]" does not have the same revision as
> the module that is part of RFC8366 (2018-05-09).

Done, and they have now fixed all these issues.

> Also, in at least two
> instances, I managed to somehow download a blank module file, which
> then magically downloaded properly after a retry.
> 
> that this blog entry is a much more reliable source compared to the
> IANA site.

The IANA site is getting better.  The new process is that the RFC
editor sends the YANG module to IANA as it is before it is put into
the text format in the RFC, i.e., before indentation and page breaks
and all that.

I just which there was a one-click way (or better some repo) to get
all files.

/martin

---

From: Mahesh Jethanandani <[email-masked]>
Date: Thu, 11 Oct 2018 07:43:55 -0700

> On Oct 10, 2018, at 11:51 PM, Martin Bjorklund <[email-masked]> wrote:
> 

There is. Benoit had written it, but for the life of me I cannot remember what it is called. Have send him a note, but he is offline till Nov.

Mahesh Jethanandani
[email-masked]

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 11 Oct 2018 17:04:59 +0200 (CEST)

Mahesh Jethanandani <[email-masked]> wrote:
> There is. Benoit had written it, but for the life of me I cannot
> remember what it is called.

I meant from IANA.  3rd party mirrored repos are fine, but it would be
nice to get them directly from IANA in a simple way.

/martin

---

From: Mahesh Jethanandani <[email-masked]>
Date: Thu, 11 Oct 2018 12:42:07 -0700

> On Oct 11, 2018, at 8:04 AM, Martin Bjorklund <[email-masked]> wrote:
> 

Ok. Here is the process.

You can get the entire IANA repository by doing this:

rsync -avzH rsync.iana.org <http://rsync.iana.org/>::assignments std/iana

But if you care just about the YANG models in the IANA repository, do this:

rsync -avz --delete rsync.ietf.org::iana/yang-parameters .

Mahesh Jethanandani
[email-masked]