Subject: Re: [netmod] smi2yang-18: incomplete well known type mappings [strawman: accept #18-01]

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

On Mon, 14 Nov 2011, Juergen Schoenwaelder wrote:

> * smi2yang-18: incomplete well known type mappings [strawman: accept #18-01]
>
>   Extend the special type mappings as it seems rather incomplete.
>
> ** Solution #18-01
>
>    Add explicit mapping for ZeroBasedCounter* types. They are listed
>    as having an equivalent type in the YANG world in Table 1 of RFC
>    6021.
>
>    Map TruthValue to the YANG boolean.
>
> ** Solution #18-02
>
>    Remove all special case type mappings.

In RFC 6021, there are two tables of SMIv2-YANG type equivalents.
Table 1 is for ietf-yang-types, and Table 2 is for ietf-inet-types.
It seems reasonable to me that when converting SMIv2 documents to YANG,
all of the equivalent types mentioned in both tables in that RFC should
have an expliclit mapping in the ietf-netmod-smi-yang document.

In my message to the mailing list on November 9, I provided my
"working list" of mappings.  Some of those are reflected already in
Solution #18-01.  Some of those are not reflected in Solution #18-01
and I would not argue that they should be.  The following mappings
(revised) appear in either Table 1 or Table 2 in RFC 6021, and I
propose that they should all be included as part of Solution #18-01.

  SMIv2                      YANG                       Reference
  -----                      ----                       ---------
  TruthValue                 boolean                    RFC 2579
  Counter32                  yang:counter32             RFC 2578
  ZeroBasedCounter32         yang:zero-based-counter32  RFC 4502
  Counter64                  yang:counter64             RFC 2578
  ZeroBasedCounter64         yang:zero-based-counter64  RFC 2856
  Gauge32                    yang:gauge32               RFC 2578
  Gauge                      yang:gauge32               RFC 1155
  CounterBasedGauge64        yang:gauge64               RFC 2856
  TimeTicks                  yang:timeticks             RFC 2578
  TimeStamp                  yang:timestamp             RFC 2579
  PhysAddress                yang:phys-address          RFC 2579
  MacAddress                 yang:mac-address           RFC 2579
  InetVersion                inet:ip-version            RFC 4001
  Dscp                       inet:dscp                  RFC 3289
  IPv6FlowLabel              inet:ipv6-flow-label       RFC 3595
  InetPortNumber             inet:port-number           RFC 4001
  InetAutonomousSystemNumber inet:as-number             RFC 4001
  Uri                        inet:uri                   RFC 5017

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