Re: [netmod] yang canonical integer format

Kent Watsen <kwatsen@juniper.net> Fri, 03 March 2017 16:52 UTC

Return-Path: <kwatsen@juniper.net>
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 18AE812958B for <netmod@ietfa.amsl.com>; Fri, 3 Mar 2017 08:52:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=junipernetworks.onmicrosoft.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 Yp_yHvQ0azKm for <netmod@ietfa.amsl.com>; Fri, 3 Mar 2017 08:52:22 -0800 (PST)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0107.outbound.protection.outlook.com [104.47.37.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 260871294BC for <netmod@ietf.org>; Fri, 3 Mar 2017 08:52:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=junipernetworks.onmicrosoft.com; s=selector1-juniper-net; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=R+LrUZ25B03OxpGmM015LZoqXhzjULcqWl6fkA02mbU=; b=AfOHIrdZsco5bkHEUmSWzlq5QmXdWJwV9SRHfD0DLldliCvxxxuFLFz4ww3qYS99jey9JXzIc8EQpO5hyBae+CoIDq0tEWGOAZBCpxsZ6DrIrHRUrvBppsPtdB8yazz9/Jtn44mZr0uJ9xSL5AociZ9C7/74oFiORacITjjWj6Y=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1444.namprd05.prod.outlook.com (10.160.117.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2; Fri, 3 Mar 2017 16:52:20 +0000
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) by BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) with mapi id 15.01.0947.015; Fri, 3 Mar 2017 16:52:20 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] yang canonical integer format
Thread-Index: AQHSlDZMewvn5zHZ50+FdydX6eHLRqGDAMyA
Date: Fri, 3 Mar 2017 16:52:19 +0000
Message-ID: <4B5054DF-3B5C-4727-9245-7F0150821C8D@juniper.net>
References: <20170303155322.GA3345@elstar.local>
In-Reply-To: <20170303155322.GA3345@elstar.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.1f.0.170216
authentication-results: jacobs-university.de; dkim=none (message not signed) header.d=none;jacobs-university.de; dmarc=none action=none header.from=juniper.net;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [66.129.241.11]
x-ms-office365-filtering-correlation-id: 7d7406da-17a6-49e9-2d91-08d46255a848
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:BN3PR0501MB1444;
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1444; 7:FMwn1OTnQoSuBCO7mAZiapIs0H/DNHJqgip8FYz1crfv6M8IwlzyKC3fzbhWyDqNRowO4+bG85uO02lsfezl/lrgajfAok0LsKjse1xcLRmYRsBVPSWg8mTtNf+ec0Dkq34BdEAZxre46FogWPjtjXwElBKos7mruKSq/Gk5pXgujBOvClbmrCSeNY9qWYF7oJddQSrrqGquT1IZfGgGLEnO4P8wXm7TfmItzEF0iin6jN5EGVKlwqUrYWxTuZfIFSjroweoqxpoBn9q7B8nunINSuV7bKgJ/Eot/iJpzG4DfGBFG0e7uQ9Nz82Y3CYQdOabZfKkrMjaQAZ9B2K0jg==
x-microsoft-antispam-prvs: <BN3PR0501MB1444871038945FB74F73802CA52B0@BN3PR0501MB1444.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(166708455590820);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(6072148); SRVR:BN3PR0501MB1444; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0501MB1444;
x-forefront-prvs: 0235CBE7D0
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39860400002)(39840400002)(39410400002)(39450400003)(39850400002)(3846002)(99286003)(92566002)(6246003)(2950100002)(6116002)(50986999)(36756003)(76176999)(3660700001)(229853002)(83716003)(2906002)(38730400002)(53936002)(102836003)(3280700002)(6512007)(6306002)(83506001)(106116001)(82746002)(66066001)(2900100001)(5660300001)(2501003)(4001350100001)(33656002)(189998001)(54356999)(8676002)(8936002)(122556002)(7736002)(305945005)(25786008)(77096006)(6486002)(86362001)(6506006)(6436002)(81166006)(104396002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1444; H:BN3PR0501MB1442.namprd05.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <6F198B69E4FE154E94B5D641E08FA29D@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2017 16:52:19.9564 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1444
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/EsR-58T6tZOWxw1LogKhHwrr-54>
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: Fri, 03 Mar 2017 16:52:24 -0000

Hi Juergen,

> Hi,
> 
> the canonical format for integer types is the decimal representation.
> We do not seem to have a mechanism (other than a description statement)
> to declare that the canonical representation is lets say hexadecimal.
> For example, EtherType <https://en.wikipedia.org/wiki/EtherType> values
> are usually written in hexadecimal notation. If I use a plain uint16
> to represent an EtherType, it comes out of a datastore rendered as a
> decimal number - and all I have is a description statement... Would
> be nice to say something like
> 
>  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?
>
> /js


Ideas for the next revision of YANG are being captured in this tracker:

  https://github.com/netmod-wg/yang-next/issues


K.