Re: [netmod] rfc6991bis: yang:percentage

Benoit Claise <bclaise@cisco.com> Thu, 30 July 2020 12: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 E9A613A1102 for <netmod@ietfa.amsl.com>; Thu, 30 Jul 2020 05:58:31 -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 aJlvZ4GHo-Zw for <netmod@ietfa.amsl.com>; Thu, 30 Jul 2020 05:58:29 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6DF173A10FE for <netmod@ietf.org>; Thu, 30 Jul 2020 05:58:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5519; q=dns/txt; s=iport; t=1596113908; x=1597323508; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=mbC8bywf19hghjSw6xU3ZsNm4UXo36L/7h7WmIB6tZw=; b=nBfYIJ5TQUmh4uYccwnhWTtPW70adJFmiVyg5ZreIeYMKI7n/rw65dFl baZbhBFwPVzmFKRgfKMZNfwMdjT+80qNkV5KOPO5CbKtXG43y8QNPJ+JC HutYk4esa7CFBh+Vf+tJSc7X/HuXfK7jzPC7/Ql5QGJmvhxNwuoImiGqx E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AdBQB1wyJf/xbLJq1dAxwBAQEBAQEHAQESAQEEBAEBggqDGVQBIBIshDWJAYdyJZN2iBcLAQEBDAEBGAEKDAQBAYQIRAKCLCU4EwIDAQELAQEFAQEBAgEGBG2FXAyFcQEBAQMBAQEhSxkCCw4CCCoCAhsMMAYBDAYCAQGDIgGCXCAPrmp2gTKFUoM9gToGBYEzjSeBQT+BOAyCXT6CXAEBggAmgk+CYASSLIdFgRiafoJpiFuRGAUHAx6RS44pkh+KM4lcixACBAsCFYFqI4FXMxoIGxU7gmlQGQ2SQ4RhhUQ/AzA3AgYBBwEBAwmRDQEB
X-IronPort-AV: E=Sophos; i="5.75,414,1589241600"; d="scan'208,217"; a="28350544"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 30 Jul 2020 12:58:24 +0000
Received: from [10.55.221.38] (ams-bclaise-nitro5.cisco.com [10.55.221.38]) (authenticated bits=0) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTPSA id 06UCwM50015321 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Jul 2020 12:58:23 GMT
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, netmod@ietf.org
References: <20200717191638.6wl3dqktcrnghuyl@anna.jacobs.jacobs-university.de> <87d04qzgpa.fsf@nic.cz>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <820fc6fe-9c50-9cb1-9666-6efbacd7f200@cisco.com>
Date: Thu, 30 Jul 2020 14:58:22 +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: <87d04qzgpa.fsf@nic.cz>
Content-Type: multipart/alternative; boundary="------------27F14D28BEAC5932E573CC0D"
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-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/H7Vs15k103OCQdXQWQTdkxCh6pw>
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 12:58:32 -0000

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";

    	}
    }
          

Regards, Benoit


>
> Lada
>
>> -- 
>> 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/>
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod