Subject: [yang-doctors] smidump for MIB => YANG generation and the YANG revision statement

From: Benoit Claise <[email-masked]>
Date: Fri, 2 Jun 2017 15:16:13 +0200

Hi Jürgen,

You developed smidump, if I'm not mistaken.
smidump doesn't add a revision statement for the YANG module.
This might be a problem when the MIB module evolves, which in turn 
implies that the YANG module evolves.
Would it be possible to generate the YANG revision statement based on 
the SMI LAST-UPDATED field?
Background: in the yangcatalog.org, we index all YANG modules by module 
name and revision.

I found https://www.ibr.cs.tu-bs.de/projects/libsmi/download/, but there 
is no github repo for issue tracker.

Regards, Benoit

---

From: "Einar Nilsen-Nygaard (einarnn)" <[email-masked]>
Date: Fri, 2 Jun 2017 13:22:02 +0000

I’ve just done a little investigation, and the current version for download (0.5.0) translates the SMIv2 list of REVISION and DESCRIPTION clauses correctly into a list of YANG revision + description clauses. Also, looking at ENTITY-MIB, we can see that the LAST-UPDATED date is the same as the last revision, so we *should* be correctly generating data if the MIB is correctly specified.

I wonder if the generated YANG files we’ve been looking at were created by an older version of smidump?

Cheers,

Einar

> On 2 Jun 2017, at 14:16, Benoit Claise (bclaise) <[email-masked]> wrote:
> 
> Hi Jürgen,
> 
> This might be a problem when the MIB module evolves, which in turn implies that the YANG module evolves.
> Would it be possible to generate the YANG revision statement based on the SMI LAST-UPDATED field?
> Background: in the yangcatalog.org, we index all YANG modules by module name and revision.
> 
> I found https://www.ibr.cs.tu-bs.de/projects/libsmi/download/, but there is no github repo for issue tracker.
> 
> Regards, Benoit

---

From: "Einar Nilsen-Nygaard (einarnn)" <[email-masked]>
Date: Fri, 2 Jun 2017 13:31:15 +0000

Or from MIBs that are incorrectly specified!

> On 2 Jun 2017, at 14:22, Einar Nilsen-Nygaard (einarnn) <[email-masked]> wrote:
>

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 2 Jun 2017 15:49:51 +0200

> I’ve just done a little investigation, and the current version for download (0.5.0) translates the SMIv2 list of REVISION and DESCRIPTION clauses correctly into a list of YANG revision + descriptio…

Yes, the smi2yang translation translates SMIv2 REVISION clauses to
YANG revision statements. If the MIB module has a proper REVISION
clause matching the LAST-UPDATED clause, everything should be fine.
If the MIB does announce a LAST-UPDATED time that does not match the
REVISION clause, this will get unnoticed (although smidump will warn
about this).

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>