Re: [netconf] [core] YANG encoding in CBOR

Carsten Bormann <cabo@tzi.org> Sun, 24 March 2019 22:24 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 40F29120162; Sun, 24 Mar 2019 15:24:18 -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 F7QfvduC11dU; Sun, 24 Mar 2019 15:24:16 -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 6CA6D120161; Sun, 24 Mar 2019 15:24:16 -0700 (PDT)
Received: from surfer-172-30-2-245-hotspot.internet-for-guests.com (107.223.broadband2.iol.cz [83.208.223.107]) (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 44SBl20Pwlzyhl; Sun, 24 Mar 2019 23:24:13 +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: <CABCOCHRcEPUB=Yf2Vdf6ZpN-SxjYeMPL_54-EKMYSpUO9b-RwA@mail.gmail.com>
Date: Sun, 24 Mar 2019 23:24:12 +0100
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
X-Mao-Original-Outgoing-Id: 575159051.249061-d1cd3989a1f1a6d61b43376ae4697251
Content-Transfer-Encoding: quoted-printable
Message-Id: <640708E8-F80E-49EE-9AEF-DA8DAEE3AA57@tzi.org>
References: <6235c6683ff14848a661f8b8cec94280@XCH-RCD-007.cisco.com> <BL0PR06MB5042823429DB7CDA0F33408B9A430@BL0PR06MB5042.namprd06.prod.outlook.com> <588401AB-483E-40F5-95BB-20A066E56DAC@tzi.org> <15fbaf84b20343a1b83f40b571149a14@XCH-RCD-007.cisco.com> <1ADF8201-ABB4-44FD-A515-F3F8E0DBF5FC@tzi.org> <20190323101003.gp3zvsvqqwc26jip@anna.jacobs.jacobs-university.de> <6BAAAC0E-F91B-411B-8768-F628C57FF2E0@tzi.org> <20190323133519.nv6sw72upxchr7p3@anna.jacobs.jacobs-university.de> <3D7C33C9-CB86-4965-899D-93C4B7343DF7@tzi.org> <CABCOCHRcEPUB=Yf2Vdf6ZpN-SxjYeMPL_54-EKMYSpUO9b-RwA@mail.gmail.com>
To: Andy Bierman <andy@yumaworks.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/ZcFlVdD7hvcwllVAJVifCfdV9uY>
Subject: Re: [netconf] [core] 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: Sun, 24 Mar 2019 22:24:18 -0000

On Mar 24, 2019, at 12:29, Andy Bierman <andy@yumaworks.com>; wrote:
> 
> The answer seems to be simple but inefficient:
> Always encode bits or enumeration as a string, if this is within a union type.

For enum values within unions (which are already handled specially by giving them a CBOR tag) we could simply use a SID (that we then would have to generate for each enum value) instead of a string.  We could also extend this to enums outside unions; but here the recurrence to the (outside unions unambiguous) value sounds better to me.

Bits.  Oh.  Same procedure, I’d say.

Grüße, Carsten