Re: [netmod] type equivalence
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 22 February 2021 09:25 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 D5A183A1121 for <netmod@ietfa.amsl.com>; Mon, 22 Feb 2021 01:25:02 -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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-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=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 A7CCrTqd3RXX for <netmod@ietfa.amsl.com>; Mon, 22 Feb 2021 01:25:01 -0800 (PST)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10082.outbound.protection.outlook.com [40.107.1.82]) (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 9928F3A10B4 for <netmod@ietf.org>; Mon, 22 Feb 2021 01:25:00 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbgWnvRRQnY9BWc3NezxQhiiNPVgynI50NR1rsghimWfU6OcBfn8gPw6VAy7+ACht+0Xn1EDb75h4PCyuTWqiUnfUdxMI5NrS3dffpqW6k5WdzxK922GnH8+gzuAAKalWxA2mcnEmpYnF78Ez3ilJ1Pr90xOkwLTlbNQSAgE/4Xs0Rqy5h9l0MhNhKjOmYnjJLKSjtSNWwxRGdUfvaj2pxwjlHk6TnZYA2+VhZuBQHeZ+4cvYLkc93aghELlZqyLPRmDGD+H8PtLdeAmbxoYkB5qXJFYIEgmhDEyiyb+jCSMA/wz+c3psd8fW+GkPgmzMUnX0soSO+CT7J/g9EqdoA==
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=O9oS31A5wZS/UBpgUMjXCngDQmgfDImYRGJWKZKUq98=; b=FRhkh7IskC9F+CMkhDisHyep667KoW09248OmkyStyDVywkP021DUYSpHTSwfGi3ooBeeRnXdaIX1z317ndW8xrNhHl+8C3X8ZulUPp9aIjO6hrlnEHbXSOtn/Sn/xhPsLEc75uFyemsjGdAIvbDcJqOUaND0jJMuKxgm+KFd7cQv8rep4qdzk3U4wkeRp3GaXtUu9Jmr0shs6loyah+Sp7nS/xaQ/DVuvfJswDs7xxPOFtXMbT1R0iq020RZr99S92PSUmilvDOg/dUHpyZCwgC9LGBOYI8Ss8wXBn9/TH/nEb+BOkVhUVA9Ks3Kw9N2Aq6BFQ5aVONrkGlsr6Ngw==
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=O9oS31A5wZS/UBpgUMjXCngDQmgfDImYRGJWKZKUq98=; b=qalK7J6n+8kycBr2tuXp4rn7ayXSZw2e6TRT4aUv7bUd+eKDueiP/zJ9spnW6Oa/tvwu0wViHXFhGFf7gKLEYaY26CaAqXqR2l9gMOtFe+fD0SFfMKD6Eyf04cKBCv8q0aDyl1DMKgoPkEeoTPoSZVWEk8+lYfY+g0OpDPBxmk4=
Authentication-Results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=jacobs-university.de;
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23) by AM0P190MB0577.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:195::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.29; Mon, 22 Feb 2021 09:24:57 +0000
Received: from AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::1ce1:49e3:3e54:804d]) by AM0P190MB0641.EURP190.PROD.OUTLOOK.COM ([fe80::1ce1:49e3:3e54:804d%5]) with mapi id 15.20.3868.033; Mon, 22 Feb 2021 09:24:57 +0000
Date: Mon, 22 Feb 2021 10:24:55 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Carsten Bormann <cabo@tzi.org>
Cc: netmod@ietf.org
Message-ID: <20210222092455.qupjm2d4lpm4ay4n@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Carsten Bormann <cabo@tzi.org>, netmod@ietf.org
References: <20210219165549.be7l2rbhdqfevhfl@anna.jacobs.jacobs-university.de> <4A8F7739-71AA-4CE0-B9D1-9F24C60B037D@tzi.org> <20210219181858.arafmdtraq4ydir2@anna.jacobs.jacobs-university.de> <CD64BB41-E2BE-4B25-AA55-3B91D7C0D313@tzi.org>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CD64BB41-E2BE-4B25-AA55-3B91D7C0D313@tzi.org>
X-Originating-IP: [212.201.44.244]
X-ClientProxiedBy: AM8P189CA0020.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::25) To AM0P190MB0641.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:194::23)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (212.201.44.244) by AM8P189CA0020.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.28 via Frontend Transport; Mon, 22 Feb 2021 09:24:57 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: a9bfd99a-af2a-4338-5dca-08d8d713b86f
X-MS-TrafficTypeDiagnostic: AM0P190MB0577:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <AM0P190MB0577F2D92D8C51B8B70642C4DE819@AM0P190MB0577.EURP190.PROD.OUTLOOK.COM>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: p5SQ6Yz7wH9nTqRPCd5kTZKgGfrGltbH4INifNOssXETSe/7ELtAWrtmEBRBfk1Fy7NaITmlSIzrkF6hymmecTLpEpjRWysuVq5Wfdxt6l9iZPGpSMuPAfsupUET0QMApi119qQdhhb9eS7TBnsEVtWkH3Gwv0o0wZJlJ34wQU3rlzfHeCm6az8BU4Il5/VkS03fSW2wU/eBZ7Sc9rrw3Z/VVrje8fxgUZzzhsyCCR6SM8rpYUBKRdMyFewapjTyBkvGUfq0s0RDa7GfcgXmd1r8xjjVrFKlImDoZYVf4iRrGxXR3y9/zYccs1RxPz1MyfHkcmf0wmAtFFkd2Qh4YLBe1r9nZYESA/xpLSf3sVFlEYOGWQqATDm6B7yQdevHTuEY1RKnl2hGvq8t6AxYDtPRF+NvuxW+qVlCvEmN3wGC7FFnXFW15zkOlnY7mpWFl3yVNlqam6s5nxWKeH4r+xKb3CgDsZXHNizRwzjnKtB2+7BqcIVYa77eMGYKl4qUJSuebDS0BPPZptBmY5rhfw48uRq+5uLZaxap51Y907a4BToWenB8oAccpCYv4gViblZaPosLzhPugYzRpBS/MuFZxuuJjz9Yip3KRUHXxM6TUFUXsbLlDxDGd1acwK6BiFF6fTdxgJS21Wydqo5FMbVDdys0ga/VNltJoYx+cpM=
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0P190MB0641.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(396003)(39850400004)(376002)(136003)(366004)(346002)(5660300002)(956004)(66476007)(66946007)(66556008)(1076003)(83080400002)(3450700001)(478600001)(6486002)(86362001)(186003)(2906002)(16526019)(26005)(52116002)(53546011)(4326008)(6916009)(6496006)(316002)(786003)(8936002)(8676002); DIR:OUT; SFP:1101;
X-MS-Exchange-AntiSpam-MessageData: ZGIpstO6Cp8sCGZWYRrdoMjmEi2leWUzsSAmL/wV26+KjoysjaP4t8eFFYVEErl4pmUYJ7dDFVaY/PIRkjHyAtsx9QRJMml7wiSADDaYVHJILseEIQWTkUPtZLBfxzOcbOvhO9UYpNC+ILinlFulurRXYDXCxk74w0rMMrndRlacGVPSJNB0J4y2g8+/XWuvSleIz2AwAMQ82jLmDyvsZwiZ9xA6TwmeTCWQ2GcUQpM1qBRjG2hisfNj+38D8H077t2LxM4NOjt7JgjO4nUPv8qS3UmIKj3KTw29j1DRNIPcnS+oFX7VUgAgaQy3YRVP9hHgbMbyfaR1jBvNXE0jjOTpsIO3zRU4FYJOMKGRN3U3EUCA0mYhsRCANZQEZ1dz5TGGj9QAWyQ2P0u0vBwfp0LHbAr1vWmZYASLT0ZHGGzy+xjwINJmM5wGZCnkBOdBtMMyq3COXedMxGF768Su/hMDy0YWFsTwViF3+Vdtkw8zYoBgqISPx7ADbx4UBQ5q7NSeNl9mM+r/LVGysr7zmc0WCdgFWqGo4LjypGePMU4MBfBAaNhc+1hlf1gboPTOC9hZ0MkLt04Ww6GaWNRYPqsGyXmVlr1azalFG2Q7zTZfzwI2RnaCvcMlNNRne/Nb5GcLgPs8esYkAiNwQvmvHeR2VSnvUSKVfqrR9mJ9S7TqUjmd/0ud2H0Ul92Iwnci0a64FVMJIznA1b7tnsS57rVbGN23eQHJZo+o4MMAk2gYgvnkyEXI1o/S5ARC/gKiAToCaR8Tkkn6FVtgFWaqZeSrlAQKiJL0QyGPh2u60OxSCmqM+jNOGm8gsqS4Ste3nFZJ7m2BXjL/SYh4dgt5jO0oFYlF52hk88wXja6zbIM09+M+wujczH5D+AT6whjinfGd7IielEj3KjDMRo6ZdKlx9OTDV7B95J/CL/8F0rleXkCwpoZs6pCrL9X29mbSgLxgAwVLgplA2FDpENiRzC7cVmqDCAK1SxNdgU9dvWtHtgut90mgR/BKSdVCD2nuvw644iilHlogRjNn9MN3B3OypKmYgdKaB4nELL/YHIwrx359LLIinQNb4FkK1MeJJTDgtR7b+gLdrsL1URAoopr6iW9Fab1cHq45ZoQsKm8VJe+aMsIoTQsz4l9qN8bac6l+zjJ3vVPfVsX6nKUJWRn5BUvCVm74ZVP+bXM+MU682/K1M845FV6u1MekEbCRDgTuyLr29lUQE28pToRZYTVSWWwFeO7ID2dq9kfIPLGAnn2VA4GhG59XQvLFLd0/eUA/kU+J4qsIblZmTvRhe29cUn3Lu4kXGEurqzxmIm0PdKXDDb+PoOMJGv/k1d0x
X-OriginatorOrg: jacobs-university.de
X-MS-Exchange-CrossTenant-Network-Message-Id: a9bfd99a-af2a-4338-5dca-08d8d713b86f
X-MS-Exchange-CrossTenant-AuthSource: AM0P190MB0641.EURP190.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2021 09:24:57.3025 (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: Cxn6cFFERzkomQl6m1MpXVpF9T3XcmcbSsr2agMUcRpvOxx0Vxfih3/9SAQdgB40ukn7TJHgKDelpP2Ii3g0lTEHj240mLbfjUpe6/6Dojs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P190MB0577
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/94eA567JXW5hOkjzY4X0fs8S_es>
Subject: Re: [netmod] type equivalence
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, 22 Feb 2021 09:25:03 -0000
On Fri, Feb 19, 2021 at 10:32:34PM +0100, Carsten Bormann wrote: > > > > On 2021-02-19, at 19:18, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote: > > > > I think the CBOR encoding picks different tags depending on the > > signedness of the base type and this is why things are not that simple > > anymore. > > (This is not the CBOR encoding, but the COMI encoding of keys in URIs.) OK. The CBOR document indeed says: 6.1. The unsigned integer Types Leafs of type uint8, uint16, uint32 and uint64 MUST be encoded using a CBOR unsigned integer data item (major type 0). 6.2. The integer Types Leafs of type int8, int16, int32 and int64 MUST be encoded using either CBOR unsigned integer (major type 0) or CBOR negative integer (major type 1), depending on the actual value. This means the type 'int8 { range 0..10; }' leads to the same encodings as the type 'uint8 { range 0..10; }'. > > For the XML and JSON encodings, all definitions lead to the > > same on-the-wire representation, hence the difference is more an > > implementation detail. I have no clue what the gnmi people do. The > > more diverse encodings we add, the more complex things get. > > Well, if the equivalence expectation that I was trying to describe actually is ingrained, then whoever designs an encoding (COMI for its URI encoding included) needs to respect it. That would be important to know. > Exactly. I think we never defined this. And of course, this can get even more fun if you consider string based encodings. The type type string { pattern "1|2|3|4"; } yields the same _XML encoded_ value space as type int32 { range "1..4"; } but as far as I recall the JSON/CBOR encodings will treat these two differently. So yes, ideally the YANG language would have clear rules what YANG's type equivalences are. /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/>
- [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Ladislav Lhotka
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Ladislav Lhotka
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann
- Re: [netmod] type equivalence tom petch
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Andy Bierman
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] [SUSPECTED SPAM] Re: type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Martin Björklund
- Re: [netmod] type equivalence Rob Wilton (rwilton)
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Juergen Schoenwaelder
- Re: [netmod] type equivalence Carsten Bormann