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

Ladislav Lhotka <lhotka@nic.cz> Mon, 01 April 2019 08:08 UTC

Return-Path: <lhotka@nic.cz>
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 4DBE01200C1 for <yang-doctors@ietfa.amsl.com>; Mon, 1 Apr 2019 01:08:00 -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 VOGUbAfwWPQm for <yang-doctors@ietfa.amsl.com>; Mon, 1 Apr 2019 01:07:57 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 1A87712009E for <yang-doctors@ietf.org>; Mon, 1 Apr 2019 01:07:56 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id B504418203FA; Mon, 1 Apr 2019 10:06:55 +0200 (CEST)
Received: from localhost (unknown [195.113.220.123]) by trail.lhotka.name (Postfix) with ESMTPSA id D159F1820043; Mon, 1 Apr 2019 10:06:38 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Benoit Claise <bclaise@cisco.com>
Cc: YANG Doctors <yang-doctors@ietf.org>, "Ruediger Volk, Deutsche Telekom Technik - FMED-41.." <rv@NIC.DTAG.DE>
In-Reply-To: <20190330142941.mx55xkis6g3do3cj@anna.jacobs.jacobs-university.de>
References: <b7a2f097-649b-ffca-6e80-921754fd85eb@cisco.com> <20190330142941.mx55xkis6g3do3cj@anna.jacobs.jacobs-university.de>
Date: Mon, 01 Apr 2019 10:07:37 +0200
Message-ID: <87lg0uywqe.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Mlx3totF1Owrr2rKLnDZnBQgZCc>
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 08:08:00 -0000

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