Subject: [netmod] ietf-yang-smiv2

From: David Reid <[email-masked]>
Date: Wed, 12 Oct 2011 15:12:34 -0400

I have a few suggestions for ietf-yang-smiv2.yang in 
draft-ietf-netmod-smi-yang-01:

1. Add an extension to indicate if an index object is IMPLIED. I believe that
   with this one addition a tool could get all of the MIB information it 
   needs from the converted yang module.

   extension implied {
     argument "index";
     description
      "If an SMIv2 INDEX object is preceded by the IMPLIED keyword, then 
       the implied statement is present in the yang module and takes as 
       an argument the name of the IMPLIED index object.";
     reference
      "RFC2578: Structure of Management Information Version 2 (SMIv2)";
   }

2. Modify the description clause of the oid extension to allow a more 
   user-friendly format. For example, ifEntry could be written as
   ifTable.1 instead of 1.3.6.1.2.1.2.2.1, or perhaps just .1 as a
   short hand notation.

   extension oid {
     argument "value";
     description
      "The oid statement takes as an argument the object identifier
       assigned to an SMIv2 definition. The object identifier value
       is written in dotted decimal notation. If an oid statement
       exists for the parent object identifier, then the value may
       be written in a short hand notation of the form 
       <parent descriptor>.<last subidentifier> or just 
       .<last subidentifier>. For example, the oid value for ifTable from
       IF-MIB would be '1.3.6.1.2.1.2.2'. The value for ifEntry could be 
       '1.3.6.1.2.1.2.2.1', 'ifTable.1', or simply '.1'. Similarily, 
       ifDescr could be '1.3.6.1.2.1.2.2.1.2', 'ifEntry.2', or '.2'";
     reference
      "RFC2578: Structure of Management Information Version 2 (SMIv2)";
   }

3. The alias extension is a useful addition. I would like to see it mentioned
   in the body of the document much like the oid extension is mentioned. Here
   are the suggested changes:

   Section 7:

   The SMIv2 uses OBJECT IDENTIFIER assignments to introduce names for
   intermediate nodes in the OBJECT IDENTIFIER tree.  OBJECT IDENTIFIER
   assignments MAY be translated into smiv2:alias statements, see the 
   YANG extension defined in Section 11.

   Section 8.6, first paragraph:

   An OBJECT-TYPE macro invocation defining an augmenting conceptual
   table MAY be translated into an smiv2:alias statement, see the    
   YANG extension defined in Section 11. The clauses of the macro are
   translated as follows:

   o  The SMIv2 SYNTAX clause is ignored.

   o  The SMIv2 UNITS clause is ignored.

   o  The SMIv2 MAX-ACCESS clause is ignored.

   o  The SMIv2 STATUS clause is mapped to the YANG status statement.
      The generation of the YANG status statement is skipped if the
      value of the STATUS clause is current.

   o  The SMIv2 DESCRIPTION clause is mapped to the YANG description
      statement.

   o  The SMIv2 REFERENCE clause is mapped to the YANG reference
      statement.

   o  The value of the SMIv2 OBJECT-TYPE macro invocation MAY be
      translated into an smiv2:oid statement, see the YANG extension
      defined in Section 11.

   Section 8.6, second paragraph, add one more bullet:

   o  The name of the SMIv2 OBJECT-TYPE macro invocation MAY be
      translated into an smiv2:alias statement, see the YANG extension
      defined in Section 11.

4. With respect to generating the smiv2 extensions, I would prefer MAY to be
   changed to SHOULD to encourage implementations to include the extensions.

-David Reid

---

From: Andy Bierman <[email-masked]>
Date: Wed, 12 Oct 2011 12:17:15 -0700

WRT/#2 below:
Why do we care about flexibility in a translation tool?
I prefer to always have the numeric OID in the smi:oid extension.
Why would the translation tool decide .1 if fine here, or ifTable.1 or whatever?
It should just generate the full OID.

Andy

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of David Reid
Sent: Wednesday, October 12, 2011 12:13 PM
To: [email-masked]
Subject: [netmod] ietf-yang-smiv2

   extension implied {
     argument "index";
     description

   extension oid {
     argument "value";
     description

   Section 7:

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

---

From: David Reid <[email-masked]>
Date: Wed, 12 Oct 2011 16:32:04 -0400

I just think the translated module is more readable with ifTable.1 
than 1.3.6.1.2.1.2.2.1

-David Reid

---

From: Andy Bierman <[email-masked]>
Date: Thu, 13 Oct 2011 01:50:22 -0700

> I just think the translated module is more readable with ifTable.1

Isn't the source MIB module readable enough?
IMO, having a consistent value that can be used as-is by tools
is more important, especially for YANG extensions.
If the app doesn't know what to expect (1 on N forms) then it has
to code for all N, all the time.

Andy

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 13 Oct 2011 11:12:30 +0200

> to code for all N, all the time.

I tend to agree with Andy on this one. And there are tools like
smixlate (shipped with libsmi) that scan input for full numeric OIDs
and do translations on the fly, that is

  smidump -f  yang --yang-smi IF-MIB | smixlate

gives you pretty much what you want (well smixlate could have options
such that it yield '<parent-descriptor>.<subidentifier>' instead of
just '<descriptor>'). In the good old Unix idea of doing things with
small dedicated programs and filter pipelines, I believe it is not
necessary to build translations into the basic algorithm. And of
course, you can always add additional statements if really needed by
customers - I think additional statements is actually better than
having smi:oid contain sometimes an absolute OID and at other times
something different since this makes post-processing much simpler.

/js

PS: BTW, thanks a lot David for all your really helpful feedback on
    this document. I will go through all your comments soon when I
    start revising this document.

-- 
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: Andy Bierman <[email-masked]>
Date: Thu, 13 Oct 2011 07:19:57 -0700

I thought there was an extension proposed already for 'oid' alias.
I agree that a separate (optional) extension for the 'FooEntry.1' format
is the way to go.  Then the app can decide (key difference) which
one to use.

Andy

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Juergen Schoenwaelder
Sent: Thursday, October 13, 2011 2:13 AM
To: Andy Bierman
Cc: [email-masked]
Subject: Re: [netmod] ietf-yang-smiv2

/js