Re: [yang-doctors] IANA full-registry definition

Martin Bjorklund <mbj@tail-f.com> Mon, 01 April 2019 11:36 UTC

Return-Path: <mbj@tail-f.com>
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 E8BA41200F5 for <yang-doctors@ietfa.amsl.com>; Mon, 1 Apr 2019 04:36:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, 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 dtyl5M0TIa6t for <yang-doctors@ietfa.amsl.com>; Mon, 1 Apr 2019 04:36:17 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 440331200F4 for <yang-doctors@ietf.org>; Mon, 1 Apr 2019 04:36:17 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id 567E81AE0398; Mon, 1 Apr 2019 13:36:15 +0200 (CEST)
Date: Mon, 01 Apr 2019 13:36:17 +0200
Message-Id: <20190401.133617.662379926427107772.mbj@tail-f.com>
To: acee@cisco.com
Cc: lhotka@nic.cz, j.schoenwaelder@jacobs-university.de, bclaise@cisco.com, yang-doctors@ietf.org, rv@NIC.DTAG.DE
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <5B876091-2B4A-45D9-91D9-D46716FECB87@cisco.com>
References: <20190330142941.mx55xkis6g3do3cj@anna.jacobs.jacobs-university.de> <87lg0uywqe.fsf@nic.cz> <5B876091-2B4A-45D9-91D9-D46716FECB87@cisco.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/F2PyVYwydy3h50AM7tsToBHyksE>
Subject: Re: [yang-doctors] IANA full-registry definition
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 01 Apr 2019 11:36:20 -0000

"Acee Lindem (acee)" <acee@cisco.com> wrote:
> We want back and forth with identities vs enums for
> iana-routing-types. We ended up with enums.
> 
> http://www.netconfcentral.org/modules/iana-routing-types 
> 
> Correct me if I'm wrong - an enum cannot be augmented but adding a new
> value in a subsequent version is backward compatible.

This is correct.


/martin


> If the latter is
> not true, we should relax this in YANG-NEXT.
> 
> Thanks,
> Acee
> 
> On 4/1/19, 4:08 AM, "yang-doctors on behalf of Ladislav Lhotka"
> <yang-doctors-bounces@ietf.org on behalf of lhotka@nic.cz> wrote:
> 
>     Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> writes:
>     
>     > Benoit,
>     >
>     > I think Ruediger's problem is a BGP module where they modeled BGP
>     > capabilities as identities and they wanted to report the negotiated
>     > capabilities as config false data. This is problematic since not all
>     > capability numbers have an identity defined and the set of known
>     > identities may differ from implementation to implementation.  It would
>     > be much easier and more robust to simply report the capability
>     > numbers. Yes, this is less readable for a human, but much more robust
>     > for automation since clients know they always get a number.
>     >
>     > An alternative would be to create a union of an identity and a uint8
>     > but this does not address the problem that the set of identities known
>     > by different implementations can differ. One could fix this problem by
>     > moving from identities to enums since an enum fixes the set of known
>     > enums. Whether it is worth to have a union of enums and numbers needs
>     
>     FWIW, in draft-lhotka-dnsop-iana-class-type-yang-01 we used a union of
>     enum and uint16 for IANA registries "DNS CLASSes" and "Resource Record
>     (RR) TYPEs".
>     
>     I would say that this approach may be preferable for centrally
>     controlled resources such as IANA registries. Identities are better
>     suited for distributed extensibility where different parties add
>     entries
>     on their own.
>     
>     Lada
>     
>     
>     > to be decided by BGP people. I would suggest to simply define (in
>     > ietf-bgp-types) a
>     >
>     > typedef capability {
>     >   type uint8;
>     >   description
>     >     "BGP capability as maintained by IANA in the BGP capability
>     >      code registry";
>     >   reference
>     >     "RFC 5492: Capabilities Advertisement with BGP-4";
>     > }
>     >
>     > and then use bt:capability that instead of the much more complicated
>     > identityref { base bt:BGP_CAPABILITY; } to report the BGP
>     > capabilities.
>     >
>     > /js
>     >
>     > On Sat, Mar 30, 2019 at 02:44:06PM +0100, Benoit Claise wrote:
>     >> Hi Doctors,
>     >> 
>     >> I was approached by Ruediger with this problem statement. I'll let
>     >> Ruediger
>     >> extend the problem description if necessary.
>     >> 
>     >> When we model an IANA registry with YANG, we model the entries one by
>     >> one as
>     >> new values are assigned by IANA.
>     >> There are some IANA registries with clear ranges. For example, fields
>     >> with a
>     >> couple of bits.
>     >> Would it be possible to have a generic way (YANG
>     >> typedef/identities:whatever) that would report all entries, even the
>     >> ones
>     >> not yet assigned. The latter would report the observed values.
>     >> 
>     >> Regards, Benoit
>     >> 
>     >> 
>     >> 
>     >> _______________________________________________
>     >> yang-doctors mailing list
>     >> yang-doctors@ietf.org
>     >> https://www.ietf.org/mailman/listinfo/yang-doctors
>     >
>     > -- 
>     > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>     > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>     > Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>     >
>     > _______________________________________________
>     > yang-doctors mailing list
>     > yang-doctors@ietf.org
>     > https://www.ietf.org/mailman/listinfo/yang-doctors
>     
>     -- 
>     Ladislav Lhotka
>     Head, CZ.NIC Labs
>     PGP Key ID: 0xB8F92B08A9F76C67
>     
>     _______________________________________________
>     yang-doctors mailing list
>     yang-doctors@ietf.org
>     https://www.ietf.org/mailman/listinfo/yang-doctors
>     
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors