Subject: Re: [netmod] enumeration type

From: Randy Presuhn <[email-masked]>
Date: Tue, 21 Jan 2014 09:35:51 -0800 (GMT-08:00)

Hi -

>From: Andy Bierman <[email-masked]>
>Sent: Jan 21, 2014 6:46 AM
>To: Jernej Tuljak <[email-masked]>
>Cc: "[email-masked]" <[email-masked]>
>Subject: Re: [netmod] enumeration type
...
>I do not understand all this fuss over a field used just
>for documentation.  The value field is not used
>in the protocol.  It is not referenced in any other
>YANG statement.

Which leads to the question: why does the value
field even exist?

>I thought the auto-assignment procedure was clear
>when I implemented it.

The problem is that there are two reasonable interpretations
of the text, and, depending on which interpretation was used
in constructing an implementation, the same module may or may
not produce an error.  That's not interoperable.

Randy

---

From: Ladislav Lhotka <[email-masked]>
Date: Wed, 22 Jan 2014 10:18:29 +0100

> Which leads to the question: why does the value

I can imagine use cases where the numeric value has some intrinsic meaning, e. g.

enum January {
    value 1;
}
…

If it is not the case, as in the timezones enumeration, the values are pretty much useless.

The only place in YANG where the values become relevant is the first bullet in sec. 10:

   o  An "enumeration" type may have new enums added, provided the old
      enums's values do not change.

Lada

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

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C