Re: [netmod] for a future rfc6991bis

Per Hedeland <per@hedeland.org> Wed, 07 November 2018 08:57 UTC

Return-Path: <per@hedeland.org>
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 64C291286D9 for <netmod@ietfa.amsl.com>; Wed, 7 Nov 2018 00:57:07 -0800 (PST)
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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=outbound.mailhop.org
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 1mdFpUhvbQiJ for <netmod@ietfa.amsl.com>; Wed, 7 Nov 2018 00:57:04 -0800 (PST)
Received: from outbound1f.eu.mailhop.org (outbound1f.eu.mailhop.org [52.28.59.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5DDE4128B14 for <netmod@ietf.org>; Wed, 7 Nov 2018 00:57:03 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1541581021; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=qqYnpKGP7BMJGcf1ji0bzqtE+2QlGX66FMNlsx3Ib1S+zBPKwZp2s0/c+bWSpb04WA8+GFguYoom6 Ihhjg6D/2jBYcoJy9BLG3i6qRrP4CIvXO0MGFFZUFhWd0nxuAw6uYLAayl2Gx7XzDg5UMTMhUCsAjw Y6FSA8jL3galZ5PZWb3Wie0Rb63MdrenTn98avVBlkx2Dyx0v9P1iFmVefsh8MTFWWJwwkzQcD581v 412cEMFfWsj8+ffjf3SLuO1PKVHRTFCFDFCWGjwHIoHaGplyKrjBJ4+uvIHYtLl3w3VvoCP0ZwMBtD zGgRKcisfa4fYt7qqpDllxZftOCKnKQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:cc:references:to:subject:dkim-signature:from; bh=PIwPYErhhO0P4iiKMR34xO40J9lqD+ReyCCny7jnp78=; b=f6hMGZHfXd7gWyV/mkEs5jzId0FIHWnx6Ov93ncOSH6+oZQi7T0lcTLgNne37wzGN+rzX7G97Y4JG WKqPD2HAjQbj5Ia1OFTNbUaKuK34W3YL5wY5kCcG/2vY2IlVPenoNO70m1nKbU7+uc7nOlDfQY74sx gO7r/HqWKr+yAM9npdR7PK7onyESwp2LLuD8LtBMoyeI8IoSYB1vShKrqupijsyQyfxjHKlk4CCMwz e9+Eqat8FI0+NDOQCIF3GZ6wOVjncO0NiYOftMwUfFGf4hhzWgcmofniVX8D4gES+eJWfOPht3jwuQ SRt5NUUslH5Bp8M0gDqEXA0Tpim1o2A==
ARC-Authentication-Results: i=1; outbound1.eu.mailhop.org; spf=none smtp.mailfrom=hedeland.org smtp.remote-ip=81.228.152.101; dmarc=none header.from=hedeland.org; arc=none header.oldest-pass=0;
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:cc:references:to:subject:from; bh=PIwPYErhhO0P4iiKMR34xO40J9lqD+ReyCCny7jnp78=; b=WMqN24mbENnmwBMHlZKfoyzO76zbXt37nEOYP7rxNc4Rvy7+op1QBasEEaL/h01y0z1Vd0GH2MSf7 aGMYQ6ONRsnEP/1pLT8mIpo1syTf0lt7OhG9ubTV2bknlPP+E+a6cdNu8sa5dOOLozzMRt8QEnuNHz UvHEsPhF0ZjQpvsGxTA5uh+aOGlpSIR4I2pxGXBtz96uj2oY6+AAz4p3l6z4I2U0PFaHZj9br5TmFP yEBL3F3wNRLRMU+VqjDzLODVO5aT8baTIcEQlD5ClCaWrEq9CD6GWpLJM52iTmdrKlAP1OKRzirnP3 BYfx5aRhczMPwkPOWtOJXgbLlkXWHcQ==
X-MHO-RoutePath: cGVyaGVkZWxhbmQ=
X-MHO-User: 12d61dfc-e26b-11e8-9048-075f73944867
X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information
X-Originating-IP: 81.228.152.101
X-Mail-Handler: DuoCircle Outbound SMTP
Received: from hedeland.org (unknown [81.228.152.101]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 12d61dfc-e26b-11e8-9048-075f73944867; Wed, 07 Nov 2018 08:56:57 +0000 (UTC)
Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id wA78urnV070206 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 7 Nov 2018 09:56:53 +0100 (CET) (envelope-from per@hedeland.org)
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
References: <B8F9A780D330094D99AF023C5877DABA9B0FC256@nkgeml513-mbs.china.huawei.com> <9C5FD3EFA72E1740A3D41BADDE0B461FCFA7803B@DGGEMM528-MBX.china.huawei.com> <20181106141613.zqy5xmq7qvahzzpz@anna.jacobs.jacobs-university.de> <9C5FD3EFA72E1740A3D41BADDE0B461FCFA78BFA@DGGEMM528-MBX.china.huawei.com> <20181107083401.7bqbjnewg3syd6dj@anna.jacobs.jacobs-university.de>
Cc: NETMOD WG <netmod@ietf.org>
From: Per Hedeland <per@hedeland.org>
Message-ID: <839c8311-6560-a792-3d1e-30fb2444a739@hedeland.org>
Date: Wed, 07 Nov 2018 09:56:53 +0100
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <20181107083401.7bqbjnewg3syd6dj@anna.jacobs.jacobs-university.de>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/A4SjKaUaz0EK9Dz3gVzNzlvpvhg>
Subject: Re: [netmod] for a future rfc6991bis
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: Wed, 07 Nov 2018 08:57:07 -0000

On 2018-11-07 09:34, Juergen Schoenwaelder wrote:
> On Wed, Nov 07, 2018 at 07:49:54AM +0000, Yemin (Amy) wrote:
> 
>> For the range, if the defintion can cover the our range(0..99.9999),
>> it will be acceptable.  In your suggestion below, does that mean the
>> base defintion is without range, while refined types can chosse the
>> range they like?
> 
> I was thinking loud. Let me detail somewhat more what was going on in
> my head:
> 
>    We could define a percent type without the upper bound being
>    whatever the decimal covers but fixing the precision of the
>    fractional part. We could then narrow the upper bound via
>    subtyping:
> 
>       typedef percent {
>         type decimal {
>           fraction-digits 4;
>           range "0..max";
>         }
>       }
> 
>       typedef percent' {
>         type percent { range 0..100; }
>       }
> 
>    If wanted flexibility on the fractional part, we could define
>    percent with a fixed range and the largest number of fraction digits
>    possible and then we could subtype this to obtain a precision that
>    makes sense in the usage contexts (although it is not clear whether
>    YANG 1.1 really allows this, if not this may be just due to nobody
>    ever thinking about this before):

I believe it is quite clear that this is *not* allowed:

   9.3.3.  Restrictions

      A decimal64 type can be restricted with the "range" statement
      (Section 9.2.4).

--Per

>      typedef percent {
>        type decimal {
>          fraction-digits 16;
>          range 0..100;
>        }
>      }
> 
>      typedef percent' {
>        type percent { fraction-digits 4; }
>      }
> 
>    An ideal solution would provide flexibility both on the range and
>    the number of fraction digits but it seems this is impossible since
>    these two properties (range and precision) interact.
> 
> So it seems we have to do something that is pragmatic and this likely
> means fixing the fraction since subtyping the fractional part may not
> be allowed by YANG or not be supported by implementations. The
> question is then how we pick suitable fractions. I understand you want
> 4 digits.
> 
> /js
> 
>> BR,
>> Amy
>> ________________________________________
>> Ñöº: Juergen Schoenwaelder [j.schoenwaelder@jacobs-university.de]
>> Ñöô: 2018t116å 22:16
>> 6öº: Yemin (Amy)
>> „: Qin Wu; Xufeng Liu; balazs.lengyel@ericsson.com; NETMOD WG
>> ;˜: Re: [netmod] for a future rfc6991bis
>>
>> Well, the draft-ye-ccamp-mw-topo-yang-02 definition excludes 100%,
>> which is likely not generally useful. In fact, even 150% can be in
>> some contexts a perfectly sensible percentage. So we may need to
>> provide some flexibility here, i.e., having a base time where the
>> range can be refined and refined types with an upper limit set to 100%
>> for use in situations where this limit is sensible.
>>
>> The more difficult aspect seems to be precision, I am not sure YANG
>> allows subtyping the fractional part. RFC 7950 seems to be silent
>> about this and in the general case this would not be meaningful. But
>> in this particular case, when the number range is limited, it would
>> actually be OK to allow this (but then we have to have a limit and
>> we can't set the upper limit to max).
>>
>> /js
>>
>> On Tue, Nov 06, 2018 at 02:21:33AM +0000, Yemin (Amy) wrote:
>>> If the percentage is defined as following, as a author of draft-ye-ccamp-mw-topo-yang-02, we will be happy to use it.
>>> But it's better to include in RFC6991bis, as percentage is a generic and widely used item.
>>>
>>> BR,
>>> Amy
>>> ________________________________
>>> Ñöº: netmod [netmod-bounces@ietf.org] ãh Qin Wu [bill.wu@huawei.com]
>>> Ñöô: 2018t116å 9:25
>>> 6öº: Xufeng Liu; balazs.lengyel@ericsson.com
>>> „: NETMOD WG
>>> ;˜: Re: [netmod] for a future rfc6991bis
>>>
>>>
>>> Another case would be :
>>>
>>>
>>> 
>>>
>>> typedef percentage {
>>>
>>>        type decimal64 {
>>>
>>>           fraction-digits 5;
>>>
>>>           range "0..100";
>>>
>>>       }
>>>
>>>     description "Percentage.";
>>>     }
>>> 
>>> Which is defined ietf-connectionless-oam.yang module.
>>>
>>> -Qin
>>> Ñöº: netmod [mailto:netmod-bounces@ietf.org] ãh Xufeng Liu
>>> Ñöô: 2018t116å 3:49
>>> 6öº: balazs.lengyel@ericsson.com
>>> „: NETMOD WG <netmod@ietf.org>
>>> ;˜: Re: [netmod] for a future rfc6991bis
>>>
>>> The draft that asked for the percentage type is: https://tools.ietf.org/html/draft-ye-ccamp-mw-topo-yang-02
>>>
>>> They currently define:
>>>
>>>                leaf availability {
>>>                  type decimal64 {
>>>                    fraction-digits 4;
>>>                    range "0..99.9999";
>>>                  }
>>>                  description "Availability level of the link";
>>>                }
>>>
>>> Thanks,
>>> - Xufeng
>>>
>>> On Sun, Nov 4, 2018 at 7:07 AM Balázs Lengyel <balazs.lengyel@ericsson.com<mailto:balazs.lengyel@ericsson.com>> wrote:
>>>
>>> +1 to percentage.
>>>
>>> Balazs
>>> On 2018. 11. 03. 3:44, Xufeng Liu wrote:
>>> Remember that some draft asked for a type of percentage value to the nearest hundredth. Wondering if it can be put in.
>>>
>>> Thanks,
>>> - Xufeng
>>>
>>> On Fri, Nov 2, 2018 at 11:39 AM tom petch <ietfc@btconnect.com<mailto:ietfc@btconnect.com>> wrote:
>>> ---- Original Message -----
>>> From: "Juergen Schoenwaelder" <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>>
>>> To: "Kent Watsen" <kwatsen@juniper.net<mailto:kwatsen@juniper..net>>
>>> Cc: <netmod@ietf.org<mailto:netmod@ietf.org>>
>>> Sent: Tuesday, October 30, 2018 10:14 AM
>>>
>>>> On Tue, Oct 30, 2018 at 12:05:17AM +0000, Kent Watsen wrote:
>>>>>
>>>>>>> In addition, it might be good to introduce [inet?] types for RFC
>>> 5322
>>>>>>> (Internet Message Format) including perhaps:
>>>>>>>
>>>>>>>    - email-address        (addr-spec, per Section 3.4.1)
>>>>>>>    - named-email-address  (name-addr, per Section 3.4)
>>>>>>>
>>>>>>
>>>>>> Where are these used? Or have these already been used somewhere?
>>>>>
>>>>> I'm unaware of these ever having been used before.  I am working on
>>> a private module for which I want to configure an email address.  After
>>> some searching, I concluded that no such types have been defined, and
>>> thus thought that they might be good candidates for addition.
>>>
>>>
>>> We could defined a user-name, of the form localpart@domainpart as is
>>> widely used to identify a user in operations but which does not, in my
>>> experience, owe anything to i18n, just a straightforward character set;
>>> yes it would not boil the ocean, but could be useful.  I am surprised
>>> not to find such a definition somewhere in our 40 or so NETCONF I-Ds.
>>>
>>> Tom Petch
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>>
>>>>
>>>> It would be good to have strong use cases. I fear that defining this
>>>> type won't be easy given that we also have internationalized email
>>>> addresses (RFC 6530 provides an overview) and we might have to create
>>>> a union of RFC 5322 addresses and "SMTPUTF8 (compliant) addresses".
>>>>
>>>> /js
>>>>
>>>> --
>>>> 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<mailto:netmod@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/netmod
>>>
>>> _______________________________________________
>>> netmod mailing list
>>> netmod@ietf.org<mailto:netmod@ietf.org>
>>> https://www.ietf.org/mailman/listinfo/netmod
>>>
>>>
>>> _______________________________________________
>>>
>>> netmod mailing list
>>>
>>> netmod@ietf.org<mailto:netmod@ietf.org>
>>>
>>> https://www.ietf.org/mailman/listinfo/netmod<UrlBlockedError.aspx>
>>>
>>> --
>>>
>>> Balazs Lengyel                       Ericsson Hungary Ltd.
>>>
>>> Senior Specialist
>>>
>>> Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com<mailto:Balazs.Lengyel@ericsson.com>
>>
>>> _______________________________________________
>>> netmod mailing list
>>> netmod@ietf.org
>>> https://www.ietf.org/mailman/listinfo/netmod
>>
>>
>> --
>> 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/>
>