Subject: [netmod] smi2yang-11: toplevel node for SMIv1 module

From: Martin Bjorklund <[email-masked]>
Date: Tue, 15 Nov 2011 08:35:29 +0100 (CET)

Hi,

This issue is described as:

  SMIv1 modules do not have a MODULE-IDENTITY node that can be used as
  the top-level node. The specification does not detail what happens
  in this case.

But the document as written defines a mapping from SMIv2.  So the
problem is SMIv2 modules w/o a MODULE-IDENTITY, right?

Can you explain why solution #11-01 doesn't work?

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 15 Nov 2011 09:39:44 +0100

> Can you explain why solution #11-01 doesn't work?

** Solution #11-01:

   Use the module name as the top-level node in such cases (this is
   what libsmi currently does) - but this has an issue if an SMIv1
   module gets converted to SMIv2

Consider a MIB module that is being converted from SMIv1 to SMIv2.
The YANG modules produced before and after the conversion are going to
be different, something I though would be good to avoid.

Saying we only do SMIv2 conversion does not really help since SMIv2
modules may import from SMIv1 modules (and there is still stuff
importing from good old RFC1213-MIB out there).

BTW, RFC1213-MIB is a good example. Note that the translations of
sysDescr from RFC1213-MIB and sysDescr from SNMPv2-MIB are going to be
different in YANG, even though it is the same thing in SNMP land.

/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/>

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 15 Nov 2011 09:46:45 +0100 (CET)

> be different, something I though would be good to avoid.

Do you mean that they would be different b/c a MODULE-IDENTITY is
added in the process of converting from SMIv1 to SMIv2?

> importing from good old RFC1213-MIB out there).

Don't we need to update the document to explicitly say that it also
handles SMIv1?

> different in YANG, even though it is the same thing in SNMP land.

I'm not sure what this is a good example of...?  It seems to be
orthogonal to SMIv1 vs. SMIv2 - this can happen also if objects in one
SMIv2 module are moved to some other module, right?

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 15 Nov 2011 09:55:22 +0100

> added in the process of converting from SMIv1 to SMIv2?

Yes.
 
> Don't we need to update the document to explicitly say that it also

If we do not rely on the MODULE-IDENTITY for the top-level, we are
fine with what David recently suggested:

SMIv1 modules may be converted to YANG by first following the rules in
^RFC3584^ to convert the SMIv1 module to SMIv2, then following the
rules in this document to convert to YANG.

> SMIv2 module are moved to some other module, right?

Yep.

/js