Re: [netmod] rfc6991bis: yang:percentage

Benoit Claise <bclaise@cisco.com> Thu, 30 July 2020 13:58 UTC

Return-Path: <bclaise@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8D2483A0D3D for <netmod@ietfa.amsl.com>; Thu, 30 Jul 2020 06:58:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.601
X-Spam-Level:
X-Spam-Status: No, score=-9.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, 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 B85C1pF6UJxr for <netmod@ietfa.amsl.com>; Thu, 30 Jul 2020 06:58:25 -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 6342A3A1171 for <netmod@ietf.org>; Thu, 30 Jul 2020 06:58:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5860; q=dns/txt; s=iport; t=1596117501; x=1597327101; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=q4RDs/Vn6Hbw+knqzudpOKC/a02IcUPUJlR6xvQ6Z+o=; b=H0h0l6aYCvCSeM4klws0XmAfAMetj5+xuA+LrFuWMnl+Io796SpEVm8v QuDHMpQtr3R7xsLVLdZDNxg3iHQQ4RCtY/0sqZbcF+6PuPhlVNks0tTSq 1tdwr/BPLPrF+ssEXNc19dSerlDRLwbfMp15Tj2cqX1KfPIbtTosV5FR1 w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A4AACu0SJf/xbLJq1gGwEBAQEBAQE?= =?us-ascii?q?BBQEBARIBAQEDAwEBAYF4BAEBAQsBgxhUASASLIQ1iQGHciWTdoYagX0LAQE?= =?us-ascii?q?BDAEBHxAEAQGETAKCLyU2Bw4CAwEBCwEBBQEBAQIBBgRthVwMhXIBBSNmCxA?= =?us-ascii?q?IKgICVxMGAgEBgyIBgnwPrwh2gTKFUoM7gToGgTgBjSaBQT+BOAyCXT6HU4J?= =?us-ascii?q?gBJIsh0WcFoJpiFuRGAUHAx6RS44pnFKJXIsQAgQLAhWBWgYtgVczGggbFYM?= =?us-ascii?q?kUBkNlySFRD8DMDcCBgEHAQEDCZBYAQE?=
X-IronPort-AV: E=Sophos; i="5.75,414,1589241600"; d="scan'208,217"; a="28353901"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 30 Jul 2020 13:58:17 +0000
Received: from [10.55.221.38] (ams-bclaise-nitro5.cisco.com [10.55.221.38]) (authenticated bits=0) by aer-core-2.cisco.com (8.15.2/8.15.2) with ESMTPSA id 06UDwGbX004175 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <netmod@ietf.org>; Thu, 30 Jul 2020 13:58:17 GMT
To: netmod@ietf.org
References: <20200717191638.6wl3dqktcrnghuyl@anna.jacobs.jacobs-university.de> <87d04qzgpa.fsf@nic.cz> <820fc6fe-9c50-9cb1-9666-6efbacd7f200@cisco.com> <20200730132557.n473s7layuruib3l@anna.jacobs.jacobs-university.de>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <f2bd5d63-950d-3334-7470-34a7607e2bdc@cisco.com>
Date: Thu, 30 Jul 2020 15:58:16 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2
MIME-Version: 1.0
In-Reply-To: <20200730132557.n473s7layuruib3l@anna.jacobs.jacobs-university.de>
Content-Type: multipart/alternative; boundary="------------8ECF6FF62496FA3DAC918FAF"
Content-Language: en-US
X-Authenticated-User: bclaise
X-Outbound-SMTP-Client: 10.55.221.38, ams-bclaise-nitro5.cisco.com
X-Outbound-Node: aer-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/GfKUWyCOTSOwD97P0_E-0VttQiU>
Subject: Re: [netmod] rfc6991bis: yang:percentage
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Jul 2020 13:58:34 -0000

On 30/07/2020 15:25, Juergen Schoenwaelder wrote:
> On Thu, Jul 30, 2020 at 02:58:22PM +0200, Benoit Claise wrote:
>> On 20/07/2020 11:19, Ladislav Lhotka wrote:
>>> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> writes:
>>>
>>>>     - Percentages are frequently used in YANG models but usages differ a
>>>>       lot in precision and range. It is not clear what the proper
>>>>       generic definition of a percentage type would be and whether it is
>>>>       worth having it.
>>>>
>>>>       RFC 7950 example:
>>>>
>>>>            typedef percent { type uint8 { range "0 .. 100"; } }
>>>>
>>>>       RFC 8294:
>>>>
>>>>            typedef percentage { type uint8 { range "0..100"; } }
>>>>
>>>>       I-Ds:
>>>>            typedef percentage { type decimal64 { fraction-digits 5; } }
>>>>            typedef percentile { type decimal64 { fraction-digits 2; } }
>>>>
>>>>       The yang catalogue seems to be down. :-(
>>>>
>>>>     - Proposal: do not add a percentage type since it is trivial to
>>>>       define a context specific percentage type that matches range and
>>>>       precision requirements (and there is already a definition in RFC
>>>>       8294 for those who need exactly that definition).
>>> I agree with this proposal. It is also possible to use
>>>
>>>      units percent;
>>>
>>> where necessary.
>> On the other hand, when I look at the numerous percent/percentage
>> occurrences in YANG model, it doesn't hurt to define that typedef.
>>
>> https://yangcatalog.org/yang-search/ => search on "node name" and typedef
>> only
>> We can find 56 entries from IETF, IEEE, BBF, OC, MEF, vendors
>> Most of them points to:
>>
>>     *typedef*  percent {
>>     	*type*  uint8 {
>>     		*range*  "0 .. 100";
>>
>>     	}
>>     }
>>
> But that one is already defined in RFC 8294 in ietf-routing-types.
> Does it make sense to define it again in yang-types?


My point was taht it makes sense to group typedefs in a few documents: 
RFC6991, 6991bis (hopefully published soon) and .... my bad,  I forgot 
that RFC 8294 is "Common YANG _data types_ for the routing area"

So we're good. Thanks.

Regards, Benoit

>
> /js
>