Re: [netconf] YANG encoding in CBOR

Carsten Bormann <cabo@tzi.org> Fri, 22 March 2019 16:08 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF05B13119A; Fri, 22 Mar 2019 09:08:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=0.001] 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 kmk-N-Jis68w; Fri, 22 Mar 2019 09:08:25 -0700 (PDT)
Received: from smtp.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ECB1413117D; Fri, 22 Mar 2019 09:08:24 -0700 (PDT)
Received: from dhcp-8804.meeting.ietf.org (dhcp-8804.meeting.ietf.org [31.133.136.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.uni-bremen.de (Postfix) with ESMTPSA id 44QpVG4gXKzyqr; Fri, 22 Mar 2019 17:08:22 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <BL0PR06MB5042823429DB7CDA0F33408B9A430@BL0PR06MB5042.namprd06.prod.outlook.com>
Date: Fri, 22 Mar 2019 17:08:20 +0100
Cc: "Rob Wilton (rwilton)" <rwilton@cisco.com>, "core@ietf.org" <core@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
X-Mao-Original-Outgoing-Id: 574963698.633944-551f0089e61a74a3cc3522d0d5977c73
Content-Transfer-Encoding: quoted-printable
Message-Id: <588401AB-483E-40F5-95BB-20A066E56DAC@tzi.org>
References: <6235c6683ff14848a661f8b8cec94280@XCH-RCD-007.cisco.com> <BL0PR06MB5042823429DB7CDA0F33408B9A430@BL0PR06MB5042.namprd06.prod.outlook.com>
To: Michel Veillette <Michel.Veillette@trilliant.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/mdeYrzpqzgis_CczujhijP1QRoc>
Subject: Re: [netconf] YANG encoding in CBOR
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Mar 2019 16:08:27 -0000

On Mar 22, 2019, at 16:45, Michel Veillette <Michel.Veillette@trilliant.com> wrote:
> 
> The only potential problem I aware is when multiple enumerations are part of the same union.
> Value 4 from enumeration A will be encoded the same way as Value 4 from enumeration B.

… and that is not a problem for the XML version, because the string is being used instead of the value.  (But then if two enumerations share a string, you have the equivalent problem in the XML serialization.)

Anyway, I haven’t seen a piece of real-world YANG that actually has this problem, so I would be a bit reluctant to make CBOR-based implementations more complex (and less efficient) so solve this (non-?)problem.

Grüße, Carsten