Re: [netmod] yang canonical integer format
Ladislav Lhotka <lhotka@nic.cz> Mon, 06 March 2017 12:28 UTC
Return-Path: <lhotka@nic.cz>
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 E3D37129666 for <netmod@ietfa.amsl.com>; Mon, 6 Mar 2017 04:28:23 -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] autolearn=ham autolearn_force=no
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 AJPZdujXP_wa for <netmod@ietfa.amsl.com>; Mon, 6 Mar 2017 04:28:22 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 00F34129663 for <netmod@ietf.org>; Mon, 6 Mar 2017 04:28:21 -0800 (PST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 8280E1820044; Mon, 6 Mar 2017 13:29:04 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Robert Varga <nite@hq.sk>, Kent Watsen <kwatsen@juniper.net>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <d71518d9-6185-f961-3bd0-0277983fe353@hq.sk>
References: <20170303155322.GA3345@elstar.local> <4B5054DF-3B5C-4727-9245-7F0150821C8D@juniper.net> <d71518d9-6185-f961-3bd0-0277983fe353@hq.sk>
Date: Mon, 06 Mar 2017 13:28:16 +0100
Message-ID: <m2shmqwpwf.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/29Kk5ZBKm3rhoS0KW2Z4M6NQ_Yk>
Subject: Re: [netmod] yang canonical integer format
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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, 06 Mar 2017 12:28:24 -0000
Robert Varga <nite@hq.sk> writes: > Hello, > > On 03/03/2017 05:52 PM, Kent Watsen wrote: >>> typedef ether-type { >>> type uint16 { format "%x"; } >>> } >>> >>> in plain YANG to make the hexadecimal format the canonical format. Who >>> maintains ideas for the next YANG revision? > > This is also useful for other types, for example inet-types:mac-address, > where implementations could use an 'canonical-pattern' type of > declaration. Perhaps even more common use case would be IP addresses - an IPv4 address is basically a uint32 represented as a dotted quad. > > I think this particular idea ties the transport-specific representation > to a type definition -- I mean requiring binary transports to send > uint16s as text is not efficient and they would end up not using the > statement at all. This is also sticky if the transport places additional > restrictions on what is and is not a valid string and reminds me of some > of the 'anyxml' problems... DSDL has "extensible datatypes" [1] that try to approach this problem from the other end: a type may provide a recipe (regular expression + XPath transformation) for parsing a string into the "internal" value. BTW, DSDL seems to be dead as dodo, even the dsdl.org domain now advertises some Danish online gambling. :-) This is sort of pity, they had quite a few interesting ideas. Lada [1] http://conferences.idealliance.org/extreme/html/2006/Tennison01/EML2006Tennison01.html > >>> >>> /js >> >> Ideas for the next revision of YANG are being captured in this tracker: >> >> https://github.com/netmod-wg/yang-next/issues >> > > given YANG is an extensible language, would it make sense to deliver > these outside of YANG revisions? > > The main reason for doing so is that these, unlike YANG revisions: > - do not change the meta model of the language > - are not mandatory-to-implement > > It will also allow for faster delivery to end users. > > Regards, > Robert > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67
- [netmod] yang canonical integer format Juergen Schoenwaelder
- Re: [netmod] yang canonical integer format Kent Watsen
- Re: [netmod] yang canonical integer format Robert Varga
- Re: [netmod] yang canonical integer format Ladislav Lhotka