Subject: Re: [netmod] smi2yang-16: smiv2:oid oid representations [open]

From: David Spakes <[email-masked]>
Date: Mon, 14 Nov 2011 18:16:13 -0500 (EST)

On Mon, 14 Nov 2011, Juergen Schoenwaelder wrote:

> * smi2yang-16: smiv2:oid oid representations [open]
>
>   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.
>
> ** Solution #16-01
>
>    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)";
>    }
>
> ** Solution #16-02
>
>    This seems mostly important for human writers not for machine
>    translations. If more notations are needed, these should be
>    separate aliases so as to allow easy processing of the OID value.
>    Hence, no change needed wrt. smiv2:oid.

Juergen,

I believe a third solution was discussed on the mailing list but never
formalized.  I don't have a strong opinion, but I thought it should be
on the list for discussion at the working group meeting.

** Solution #16-03

  extension subid {
    argument "value";
    description
     "The subid statement takes as an argument the most significant
      sub-identifier of the object identifier assigned to an SMIv2
      definition. The sub-identifier value is a single positive
      decimal whole number. The subid statement may not be used
      as a substatement to any top-level node in a YANG document.
      The subid substatement may be used only as a substatement to a
      node having a parent node defined with either a smiv2:oid or
      smiv2:subid substatement.";
    reference
     "RFC2578: Structure of Management Information Version 2 (SMIv2)";
  }

Here is an example showing the placement of smiv2:subid substatements
in a converted document.

  module IF-MIB {
    ...
    container ifTable {
      config false;
      description
       "A list of interface entries.  The number of entries is
        given by the value of ifNumber.";
      smiv2:oid 1.3.6.1.2.1.2.2;

      list ifEntry {
        key "ifIndex";
        description
         "An entry containing management information applicable to a
          particular interface.";
        smiv2:subid 1;

        leaf ifIndex {
          type if-mib:InterfaceIndex;
          description
           "A unique value, greater than zero, for each interface.  It
            is recommended that values are assigned contiguously
            starting from 1.  The value for each interface sub-layer
            must remain constant at least from one re-initialization of
            the entity's network management system to the next re-
            initialization.";
          smiv2:subid 1;
        }
        ...
      }
      ...
    }
    ...
  }

-dss

-------------------------------------------------------------
 David Spakes                       email:   [email-masked]
 SNMP Research                      voice:   +1 865 573 1434
 3001 Kimberlin Heights Road          fax:   +1 865 573 9197
 Knoxville, TN  37920-9716  USA      http://www.snmp.com
-------------------------------------------------------------

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 15 Nov 2011 03:40:43 +0100

>             the entity's network management system to the next re-

Clarification question: Is a translator allowed / required / ... to produce both
smiv2:oid and smiv2:subid statements?

/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: David Reid <[email-masked]>
Date: Tue, 15 Nov 2011 12:17:08 -0500

> smiv2:oid and smiv2:subid statements?

The point was to make it easier for the human reader and writer. Requiring both
would make it harder, so I don't think that would be the right answer.

-David Reid

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 17 Nov 2011 08:02:28 +0100

On Tue, Nov 15, 2011 at 12:17:08PM -0500, David Reid wrote:
> The point was to make it easier for the human reader and
> writer. Requiring both would make it harder, so I don't think that
> would be the right answer.

Who is the human writer here? The goal of this effort is to translate
SMIv2 MIB modules to YANG.

/js

---

From: David Reid <[email-masked]>
Date: Thu, 17 Nov 2011 10:01:43 -0500

> Who is the human writer here? 

I use these extensions in some cases to manually assign OIDs to objects 
defined in yang modules so that I can access them from SNMP.

> The goal of this effort is to translate

Yes. What I'm doing is really outside the scope of this effort. But to the 
extent that I can use standard extensions defined in this document rather 
than create my own proprietary ones, that is helpful, especially if more than 
one company is doing that.

-David Reid

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 18 Nov 2011 03:41:11 +0100

> one company is doing that.

But since we are specifying a translation algorithm, I think it is
fine to have a translator generate the full OID, no? If you want to
use the extension for other purposes, fine. It is then your choice
whether you used smiv2:oid or smiv2:subid.

/js

---

From: David Reid <[email-masked]>
Date: Fri, 18 Nov 2011 15:08:17 -0500

> fine to have a translator generate the full OID, no? 

Yes, that's fine. I know that some of what I'm doing is outside the scope
of this document.

> If you want to

I can't really use smiv2:oid if the description says it has to be the full
OID. I could use smiv2:subid if we added such a thing. Or I could use a 
proprietary extension.

-David Reid