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

Benoit Claise <bclaise@cisco.com> Sat, 30 March 2019 16:31 UTC

Return-Path: <bclaise@cisco.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 BA5861201E8 for <yang-doctors@ietfa.amsl.com>; Sat, 30 Mar 2019 09:31:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 9Jc53UliTTcp for <yang-doctors@ietfa.amsl.com>; Sat, 30 Mar 2019 09:31:04 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5F28B120158 for <yang-doctors@ietf.org>; Sat, 30 Mar 2019 09:31:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2297; q=dns/txt; s=iport; t=1553963464; x=1555173064; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=tG9h2pKWns6G7RMGvEXYBllXofWw5MyXSOKoSBdxZtc=; b=OVskasFrhbnfVO8pXnrrKe9I1+gSQJ5UnpF0b8I1/7xX47yvS2/Wfac2 vlch7Ef/e4EziqW7JH+QES59+ZgKJqwuksaD33LdmNzkFQ1KzqWDy+II6 D7hOMbnwy6jBN7u89w1ADqXWVfSytrPC5z1jC4PPA4xGVT6zIy5e1Qox1 A=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AHAAB7mZ9c/xbLJq1bCRkBAQEBAQEBAQEBAQEHAQEBAQEBgVMCAQEBAQELAYJ4cRInhA6Ie4xYmD2BexAYC4RJAoVZNgcNAQEDAQEJAQMCbRwMhUoBAQEBAgEBASEPAQU2EAsLGAICJgICJzAGDQYCAQGDHgGBbQgPqDKBL4VGhF0FgQskAYtJgUA/gREngms+gmEBAYE3gzSCNSIDpGpgCZNaBhqLPohuiz+MFYdhgVQBMIFWMxoIGxU7gmyLDIVAPgMwkFsBAQ
X-IronPort-AV: E=Sophos;i="5.60,289,1549929600"; d="scan'208";a="11066589"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 30 Mar 2019 16:31:02 +0000
Received: from [10.61.67.39] (ams3-vpn-dhcp807.cisco.com [10.61.67.39]) by aer-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id x2UGV1CO005461; Sat, 30 Mar 2019 16:31:01 GMT
To: YANG Doctors <yang-doctors@ietf.org>, "Ruediger Volk, Deutsche Telekom Technik - FMED-41.." <rv@NIC.DTAG.DE>
References: <b7a2f097-649b-ffca-6e80-921754fd85eb@cisco.com> <20190330142941.mx55xkis6g3do3cj@anna.jacobs.jacobs-university.de>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <4e68cad8-d305-c101-eb1b-258f4eab0477@cisco.com>
Date: Sat, 30 Mar 2019 17:31:00 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
MIME-Version: 1.0
In-Reply-To: <20190330142941.mx55xkis6g3do3cj@anna.jacobs.jacobs-university.de>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.61.67.39, ams3-vpn-dhcp807.cisco.com
X-Outbound-Node: aer-core-3.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/AbwOmcMwOJM9rDl5g4W5VYlUp84>
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: Sat, 30 Mar 2019 16:31:08 -0000

Jürgen,
> 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.
Bingo.

> 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
> 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.
Thanks, B.
>
> /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