Re: [netmod] hex-string as built-in type in future versions of YANG

Schönwälder, Jürgen <J.Schoenwaelder@jacobs-university.de> Wed, 06 November 2019 19:28 UTC

Return-Path: <J.Schoenwaelder@jacobs-university.de>
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 A224F1208AA for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 11:28:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jacobsuniversity.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 aNz-CG-Emcb6 for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 11:28:24 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80054.outbound.protection.outlook.com [40.107.8.54]) (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 A7BC8120899 for <netmod@ietf.org>; Wed, 6 Nov 2019 11:28:23 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JRq1iPtYEsjlQfWntg3qUoBtgxMuTabtvhf+5i6nktgq5hybCH2T42/09vxwZBkqunvL/yOm3DId4zCFLuft+EpsG7aYKp6xv8dTTSaewxbuMpB3LvYh6YTpcdcbUDHlceQp/wWDBgHi+1aNBc6t1TkckaYS5/xMmKxAYoeooAolaGPoqoSU0f3f+eS2a5aJCj8n7raBypgTj8qoyEXti7t6ME29pVj1LGgU62dbllcAqYzMitWd6uTVlrfUsaxUYnTqJUpzy+05EysiXmHJ/2XnFQDcqjRtBhOcZX1dVcueXxcGWe1TG7sbclddN1Ho2UHwuQbaIPVWGjyeaHQ+1A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UCTni1bzS5T/TzHyltVhibKGlwwmqa7MGRMHDhn3Nv4=; b=FUnYeBGle2P+0Ya/yr6CFZnt5FQ6tVWtYvqua+4fTUeSOjPYExT8rx2R7dRA91GYilQoAe2ccD48kZsJcuUouChqU3DzszE0NT09QQFXcUgN5eiW/eBErLAS8N+rUfOzdaVfQzOb7Vncultets16xPtSmevy7y3DEPp0rd5dOEPTd2wgL1yZvC4Iz5jAxRn2cd9mSvZhKlgX4ssAbi7Hl79ViwQHhWOD6ejXndt3EfwX5aLXQoi+Y7u/cC5icCvYBCxh++zTIYIIP7Al9AyDyEv7qMWwvMIFHVmqPVkKsMINz5Num6o8fiRyl1Abd9uSIeEgdtj1/V7NlvxCGmzk9A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jacobs-university.de; dmarc=pass action=none header.from=jacobs-university.de; dkim=pass header.d=jacobs-university.de; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jacobsuniversity.onmicrosoft.com; s=selector2-jacobsuniversity-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UCTni1bzS5T/TzHyltVhibKGlwwmqa7MGRMHDhn3Nv4=; b=dN/sIyHaDNMGZhcnJ87ypGo45/5WiWLuVaA4eZg29JSIjt4nQHrmCczXyJdHYee7Y58UPWdEn1/NMi+EcqMSqbVWzhdfZvBCJ7WkfVYMqlJzLZG4j5d59bG9zXSqAJ7tqjb4feVyVrfDP85Dj7keV1syUwryGNDe0dffTpQXdCg=
Received: from AM5P190MB0482.EURP190.PROD.OUTLOOK.COM (10.161.65.11) by AM5P190MB0339.EURP190.PROD.OUTLOOK.COM (10.161.89.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Wed, 6 Nov 2019 19:28:21 +0000
Received: from AM5P190MB0482.EURP190.PROD.OUTLOOK.COM ([fe80::6c6c:2cd2:11dd:2aff]) by AM5P190MB0482.EURP190.PROD.OUTLOOK.COM ([fe80::6c6c:2cd2:11dd:2aff%5]) with mapi id 15.20.2408.024; Wed, 6 Nov 2019 19:28:21 +0000
From: =?iso-8859-1?Q?Sch=F6nw=E4lder=2C_J=FCrgen?= <J.Schoenwaelder@jacobs-university.de>
To: Vladimir Vassilev <vladimir@lightside-instruments.com>
CC: tom petch <ietfa@btconnect.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] hex-string as built-in type in future versions of YANG
Thread-Index: AQHVlKY+KWDtjPWkUEerecz0ieqA5ad+LrQAgABEUYCAABRgAA==
Date: Wed, 6 Nov 2019 19:28:20 +0000
Message-ID: <20191106192820.kmcatrkn2kjn227o@anna.jacobs.jacobs-university.de>
References: <157053706777.17066.5329202935752721411.idtracker@ietfa.amsl.com> <e6e439e6-5e39-9155-7924-59e8ecde72bd@lightside-instruments.com> <00e501d58b52$2bc35b60$4001a8c0@gateway.2wire.net> <a44c75d7-123f-3d7b-e95f-f21715eba22a@lightside-instruments.com> <06eb01d58e54$84b43fa0$4001a8c0@gateway.2wire.net> <41a2a04d-a9bd-5c2d-678e-0e416a1dd556@lightside-instruments.com> <20191106141054.zgqtaroekbthad72@anna.jacobs.jacobs-university.de> <41b664d0-961a-1974-2f3b-60f0bbf3bd26@lightside-instruments.com>
In-Reply-To: <41b664d0-961a-1974-2f3b-60f0bbf3bd26@lightside-instruments.com>
Reply-To: =?iso-8859-1?Q?Sch=F6nw=E4lder=2C_J=FCrgen?= <J.Schoenwaelder@jacobs-university.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-clientproxiedby: AM0PR10CA0022.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::32) To AM5P190MB0482.EURP190.PROD.OUTLOOK.COM (2603:10a6:206:1d::11)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=J.Schoenwaelder@jacobs-university.de;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [2001:638:709:5::7]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 4484f57e-7923-4b52-d613-08d762ef7baa
x-ms-traffictypediagnostic: AM5P190MB0339:
x-ms-exchange-purlcount: 1
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <AM5P190MB03394E32FD15AD3FD4E51BDEDE790@AM5P190MB0339.EURP190.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02135EB356
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39850400004)(366004)(346002)(136003)(396003)(376002)(52314003)(189003)(199004)(6306002)(478600001)(1076003)(6116002)(14454004)(25786009)(45776006)(66446008)(64756008)(66556008)(66476007)(66946007)(5660300002)(46003)(8676002)(3450700001)(7736002)(81156014)(81166006)(316002)(305945005)(6512007)(71200400001)(2906002)(486006)(6916009)(4326008)(102836004)(8936002)(6246003)(54906003)(11346002)(786003)(446003)(476003)(6486002)(99286004)(76176011)(256004)(386003)(6506007)(186003)(6436002)(43066004)(229853002)(52116002)(71190400001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5P190MB0339; H:AM5P190MB0482.EURP190.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: jacobs-university.de does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: AHlyThGVgsY0bt199e9DiWAGIJr/sjr3bFJteTl/8Tgkq17QK7FtbGwR8mNJOvER4J00zpqHouOeEF6Xx8hrOpl2/yhfIOydA62Slu8mIFTNHUQ5UHNX8vv4tk3k4aEidISBlZP95YyNydg1ub1Zk/+C/wg35SM0U539JBKlFDhOhe12vFaFBQZ6huF2oNE818gGTQDlhQoVxFGBe1NAZGBSh+ypeEncg7Jn2fP5GImznRuuZmmtQ26GQ9Enr876hjDMbq9VkNyNI0hQS3ulGLZ3x1hnKrLVKe3PAlkbK3GAVUyZo7fkr1sOeBx07bEhCixapZyMaervuZ2cTUS7ZhWz9lrqRWYmGQx+B7vfPwQfwlZ+qcP8MEQE8mifLJ9Jr9hEPaVSO3im+Q3XuDBqwQErzyIEMZRYMzrqCclSfIUTLTnXIz4ucWy/XhtRtdUFdkYrN2r9727tzJn65JBsfkeRAawdPvP1C8LhgGyXaOE=
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <1378B1B0173AA94FA1E975BCF3A53D31@EURP190.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: 4484f57e-7923-4b52-d613-08d762ef7baa
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2019 19:28:21.0092 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f78e973e-5c0b-4ab8-bbd7-9887c95a8ebd
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ZgvEG3w0oCpS/0GpAzyPYOpQfSySwAGm6TuM1Wg7cHlryS8jmv99D+0ePexEkk4UCeo6GXvh6yTO4z0mGO0CJPAd2NErXq3SvjSNXdkRRuw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5P190MB0339
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/LN-B-2Rj13jfsgOH4J2mnUAGnbE>
Subject: Re: [netmod] hex-string as built-in type in future versions of YANG
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, 06 Nov 2019 19:28:30 -0000

On Wed, Nov 06, 2019 at 06:15:25PM +0000, Vladimir Vassilev wrote:
> 
> There is no technical reason at all to have MAC addresses represented as 
> pattern constrained strings and not "binary" of length 6 (as it was in 
> SMIv2 MIBs) either. There is no technical reason for ethertype to be 
> represented as pattern constrained string and not "binary" of length 2 
> or "uint16". It is likely done because of the sane lexical 
> representation requirement derived from NETCONF design requirement to be 
> human readable on the wire and this is not the case when the data is 
> base64 encoded or in the better case represented as decimal when humans 
> are used to its hex-string representation.

The goal was to automate configuration and configuration data used to
be given to operators (and their automation scripts) in a textual
format. I think this is why we favored textual representations (the
data on the wire is encrypted anyway). In the MIB world, we had some
limited ways to define automated conversions between binary data and
their textual representation. This mechanism was good enough for MAC
addresses, but it already falls apart with representation of IPv6
addresses according to RFC 5952.

Yes, it might have been wise to not always tie YANG's 'binary' to
'base64' but this is what we did end up doing (after longer
discussions about this). One argument was that if you want a
hex-string, you can simply define it (as long as you do not care much
about supporting binary encodings - this we did not care much about
back than, likely a mistake if I look back).

Anyway, IETF preferring lowercase characters and IEEE preferring
uppercase characters for some shared types is a non-technological
conflict and I see no easy way to resolve this.

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