Re: [netmod] yang canonical integer format

Robert Varga <nite@hq.sk> Mon, 06 March 2017 11:13 UTC

Return-Path: <nite@hq.sk>
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 86A5012963E for <netmod@ietfa.amsl.com>; Mon, 6 Mar 2017 03:13:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=hq.sk
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 DiPbOt6rgxJv for <netmod@ietfa.amsl.com>; Mon, 6 Mar 2017 03:13:48 -0800 (PST)
Received: from mail.hq.sk (hq.sk [81.89.59.181]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4EFF012963D for <netmod@ietf.org>; Mon, 6 Mar 2017 03:13:48 -0800 (PST)
Received: from [10.137.2.13] (46.229.239.158.host.vnet.sk [46.229.239.158]) by mail.hq.sk (Postfix) with ESMTPSA id C6E8124008B; Mon, 6 Mar 2017 12:13:44 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hq.sk; s=mail; t=1488798824; bh=0xu5uR/YLjmgCwWDAVX2dzlWX4UZvm/ySYtBhrfhtvE=; h=Subject:To:References:From:Date:In-Reply-To; b=qweXoGyJJ/RERfmKj0SAvWciBKmDSqSCNJaCzLxU2an2ZZY6SAKeGyzvCStMy0DNb t9gKeUoWJfLzclgPrTJA5zDNPxZ6P/ZsNoaUsAuTQVFRcts6hXe7xuX049NAkl5sn6 CPIGY1jStNK7XyDuYnTLu+/s3EvPJE5u82bk6/z0=
To: Kent Watsen <kwatsen@juniper.net>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netmod@ietf.org" <netmod@ietf.org>
References: <20170303155322.GA3345@elstar.local> <4B5054DF-3B5C-4727-9245-7F0150821C8D@juniper.net>
From: Robert Varga <nite@hq.sk>
Message-ID: <d71518d9-6185-f961-3bd0-0277983fe353@hq.sk>
Date: Mon, 6 Mar 2017 12:13:36 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <4B5054DF-3B5C-4727-9245-7F0150821C8D@juniper.net>
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o8sw4kkgDpajiuBcDtPb3skRtVJaRuccR"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/P640gri5Z35GfMUzpzCi9SdHiZw>
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 11:13:50 -0000

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.

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

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