Re: [netmod] 6021 ipv4-prefix

"Rob Wilton (rwilton)" <rwilton@cisco.com> Mon, 29 April 2019 17:08 UTC

Return-Path: <rwilton@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 B86E8120480 for <netmod@ietfa.amsl.com>; Mon, 29 Apr 2019 10:08:48 -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 Ul14A5r80Tqs for <netmod@ietfa.amsl.com>; Mon, 29 Apr 2019 10:08:46 -0700 (PDT)
Received: from alln-iport-1.cisco.com (alln-iport-1.cisco.com [173.37.142.88]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C6A0120483 for <netmod@ietf.org>; Mon, 29 Apr 2019 10:08:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2698; q=dns/txt; s=iport; t=1556557723; x=1557767323; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=LNZLaTkTjQCx7q90D3qmuySnfOVSheZBvW5GW5JBmqU=; b=BraJceRlRwpF6iTrdx6oLqyENhRhbluMd1yE77mYS5BxD/yvcxVDV82m 53ul1YFgt0ewOKjvlVFzNdLzqhfIxxeb5F69tQ+Isvu9BRw9sjqGB3oj0 6pgvEnE8xQPFHevyVVNJAOzM3XDRBC6VNsoZj3xJ/qWoPJMdpZUyBb2Iy E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ADAADyLsdc/4oNJK1jAxkBAQEBAQE?= =?us-ascii?q?BAQEBAQEHAQEBAQEBgVEEAQEBAQELAYIQaIEEKAqMIo0SmFCBew4BAR+ETgK?= =?us-ascii?q?GMiM0CQ4BAwEBBAEBAgECbRwMhUoBAQEDATo/DAICAgEIDgIBBAEBAR4QGxc?= =?us-ascii?q?dCAIEDgUIE4MIgXkPr2CKKgYFgS0Bi0kXgUA/gRGDEj6ELjcmhRsEin2begk?= =?us-ascii?q?CggmSKyOCDYociH6gWgIRFYEwHziBVnAVgyeGMYogQTGTH4EhAQE?=
X-IronPort-AV: E=Sophos;i="5.60,410,1549929600"; d="scan'208";a="265063818"
Received: from alln-core-5.cisco.com ([173.36.13.138]) by alln-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 29 Apr 2019 17:08:42 +0000
Received: from XCH-ALN-006.cisco.com (xch-aln-006.cisco.com [173.36.7.16]) by alln-core-5.cisco.com (8.15.2/8.15.2) with ESMTPS id x3TH8g6T002858 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 29 Apr 2019 17:08:42 GMT
Received: from xch-rcd-007.cisco.com (173.37.102.17) by XCH-ALN-006.cisco.com (173.36.7.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 29 Apr 2019 12:08:41 -0500
Received: from xch-rcd-007.cisco.com ([173.37.102.17]) by XCH-RCD-007.cisco.com ([173.37.102.17]) with mapi id 15.00.1473.003; Mon, 29 Apr 2019 12:08:41 -0500
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: Ladislav Lhotka <lhotka@nic.cz>, NETMOD WG <netmod@ietf.org>
Thread-Topic: [netmod] 6021 ipv4-prefix
Thread-Index: AdT0l4zGpLjvUofYRmmSWqlDWwoAHABSPgGAAAHDNYAAA12WgAABgE0AAAD0FQAAAKy0gAF1SI2AAAERvAAAFIrFgAAG4xuAAADAhYAACALZAAAA/vaAAAK/LwAAATq3AAB768IgAAtOeIAACmVD4P//tfSAgABTU/D//+IngIAAUdRQ//+41wCAAFEEMP//vSgAAApr51AACSwEAAAcvrawAC5W0QAAZu3nIA==
Date: Mon, 29 Apr 2019 17:08:41 +0000
Message-ID: <089752f1aa81402cb00a3c8c53256593@XCH-RCD-007.cisco.com>
References: <20190429103451.yink4bdvvmlh7ohe@anna.jacobs.jacobs-university.de> <c03aa9a27ed544c5be88fd0750d782e3@XCH-RCD-007.cisco.com> <20190429134615.f32zkbia6fqwk3to@anna.jacobs.jacobs-university.de> <b404565930694fd8af93326b5e754a2b@XCH-RCD-007.cisco.com> <0c4265d31adbf208a680f76216cc4bc42c766eae.camel@nic.cz> <959ed1a8092f4798ac0b923384962049@XCH-RCD-007.cisco.com> <3ec0ba130610b31709e1c511e014f9574fccd846.camel@nic.cz> <fb1edb59b75745438bfd6d1c4f293d85@XCH-RCD-007.cisco.com> <def7cc0f4a4c9b3c2ef09bc4b4f6eb4353141c72.camel@nic.cz> <0875c548bfb84cf2b0ecf838f1541572@XCH-RCD-007.cisco.com> <20190429161224.qevjf7754pevokje@anna.jacobs.jacobs-university.de>
In-Reply-To: <20190429161224.qevjf7754pevokje@anna.jacobs.jacobs-university.de>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.63.23.60]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Outbound-SMTP-Client: 173.36.7.16, xch-aln-006.cisco.com
X-Outbound-Node: alln-core-5.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Kdq5HO37zHnHnApQyKGmmz5bkn8>
Subject: Re: [netmod] 6021 ipv4-prefix
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: Mon, 29 Apr 2019 17:08:49 -0000


> -----Original Message-----
> From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
> Sent: 29 April 2019 17:12
> To: Rob Wilton (rwilton) <rwilton@cisco.com>
> Cc: Ladislav Lhotka <lhotka@nic.cz>cz>; NETMOD WG <netmod@ietf.org>
> Subject: Re: [netmod] 6021 ipv4-prefix
> 
> On Mon, Apr 29, 2019 at 03:58:03PM +0000, Rob Wilton (rwilton) wrote:
> >
> >
> > But according to RFC-7950, from a language POV, I think that it is reasonable
> to interpret the canonical format of ipv4-prefix to match that of its base YANG
> type, i.e. string.
> >
> > 9.4.2.  Canonical Form
> >
> >    The canonical form is the same as the lexical representation.  No
> >    Unicode normalization of string values is performed.
> >
> > Section "9.1.  Canonical Representation" does not state that the canonical
> format of a type may be overridden by a description statement.
> >
> 
> Section 9.1 talks about 'types' - the text does not indicate that this is restricted
> to built-in types.

The whole of section 9 is for "Built-In-Types" and doesn't cover the typedef statement.  In fact, it states "When a server sends XML-encoded data, it MUST use the canonical form defined in this section."

If YANG allows a typedef to refine the canonical definition of a base type, then I think that the YANG RFC should be explicit on this (e.g. in YANG Next).  Particularly, because this requires a server implementation to read/understand the description associated with a leaf/typedef in case they have to add specific canonicalization code to implement the leaf/typedef.

> 
> We are defining canonical formats of typedefs since RFC 6021, which was
> published together with the first version of YANG (RFC 6020). Are you telling us
> that we got this all wrong?

I'm not sure that we have really got a simple solution for either clients or servers:
 1) Clients may use non canonical format on configuration input
 2) But clients must still use canonical format for xpath expressions
 3) Clients must also handle canonical format being returned on any get requests.
 4) Servers must perform normalization of any type to a canonical format, as defined in the type/typedef/leaf description.

Possibly having a keyword in YANG to mark leaves/typedefs where the canonical definition refines the canonical type associated with the base type might have been helpful.

Thanks,
Rob

> 
> /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/>