Re: [yang-doctors] Identities vs enums

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Wed, 23 August 2017 20:36 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 80C1C13218E; Wed, 23 Aug 2017 13:36:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w2ckjAOpvbDB; Wed, 23 Aug 2017 13:36:35 -0700 (PDT)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 860C7120720; Wed, 23 Aug 2017 13:36:35 -0700 (PDT)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id 5E3E599; Wed, 23 Aug 2017 22:36:34 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id he4bMZYzdL8y; Wed, 23 Aug 2017 22:36:33 +0200 (CEST)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Wed, 23 Aug 2017 22:36:34 +0200 (CEST)
Received: from localhost (demetrius3.jacobs-university.de [212.201.44.48]) by hermes.jacobs-university.de (Postfix) with ESMTP id 35B41200E2; Wed, 23 Aug 2017 22:36:34 +0200 (CEST)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius3.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id tKNL_litf-Tk; Wed, 23 Aug 2017 22:36:33 +0200 (CEST)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id BE35A200E0; Wed, 23 Aug 2017 22:36:33 +0200 (CEST)
Received: by elstar.local (Postfix, from userid 501) id 79627404A4CB; Wed, 23 Aug 2017 22:36:33 +0200 (CEST)
Date: Wed, 23 Aug 2017 22:36:33 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <andy@yumaworks.com>
Cc: "Acee Lindem (acee)" <acee@cisco.com>, YANG Doctors <yang-doctors@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, Rodney Cummings <rodney.cummings@ni.com>
Message-ID: <20170823203633.4yseukdqncuchxdf@elstar.local>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Andy Bierman <andy@yumaworks.com>, "Acee Lindem (acee)" <acee@cisco.com>, YANG Doctors <yang-doctors@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>, Rodney Cummings <rodney.cummings@ni.com>
References: <D5BE0363.C241B%acee@cisco.com> <20170820080301.asf2fx6o4abupq4h@elstar.local> <CABCOCHRyQyCm8NaPeh_FUGrAPytcDigoPFo-EhUrySnM2_Tjbw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
X-Clacks-Overhead: GNU Terry Pratchett
Content-Transfer-Encoding: 8bit
In-Reply-To: <CABCOCHRyQyCm8NaPeh_FUGrAPytcDigoPFo-EhUrySnM2_Tjbw@mail.gmail.com>
User-Agent: NeoMutt/20170714 (1.8.3)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/MaLTIH9LWqAnmHUj0CObcI6SGCQ>
Subject: Re: [yang-doctors] Identities vs enums
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Aug 2017 20:36:37 -0000

On Wed, Aug 23, 2017 at 12:46:37PM -0700, Andy Bierman wrote:
> On Sun, Aug 20, 2017 at 1:03 AM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
> 
> > On Sat, Aug 19, 2017 at 07:02:04PM +0000, Acee Lindem (acee) wrote:
> > > All,
> > > In the context iana-routing-types.yang, we’ve been having a discussion
> > of the merits of identities vs enums. We’ve followed the lead of RFC 7224
> > and used identities which allow augmentation. However, for IANA code
> > points, there could be merit in having the type represent the actual
> > numeric value. Any thoughts on this?
> > >
> > > In the next version of YANG, it would be useful for a base identity to
> > allow it to have a "base-type" (mutually exclusive of "identity-ref"). For
> > all identities a "base-value" would be allowed as long as it conformed to
> > the constraints of the actual or inherited (via “identity-ref”) “base-type”.
> > >
> >
> > The question here really is who is charge of controlling assignments
> > of a name space.
> >
> > - If there is a single authority controlling the assignments, an enum
> >   works fine.
> >
> > - If the assignments are not controlled by a single authority, an
> >   identity works fine.
> >
> > We sometimes have situations that are somewhere in between, i.e., a
> > central authority controlling assignments but delegating parts of the
> > name space to other authoritities. I agree, we do not have good
> > support to model this explicitly in YANG today.
> >
> >
> I think Acee is asking about a new feature that does not exist in YANG,
> which is to add
> an enum value-stmt to an identity-stmt somehow.  Seems like a valid
> use-case.

Identities can be without a central authority controlling assignments
- so there is little hope that values assigned to identities carry a
useful meaning unless there is a mechanism to partition and delegate
number spaces along the identity hierarchy.

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