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

Carsten Bormann <cabo@tzi.org> Mon, 25 March 2019 07:53 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 34575120373; Mon, 25 Mar 2019 00:53:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] 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 RlRFp4zCH9JS; Mon, 25 Mar 2019 00:53:33 -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 081D81203C5; Mon, 25 Mar 2019 00:53:33 -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 44SRMt6wVtz10fS; Mon, 25 Mar 2019 08:53:30 +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: <5D0AEDAC-4AD2-4DFD-BF19-EA210773EF66@tzi.org>
Date: Mon, 25 Mar 2019 08:53:35 +0100
Cc: "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
X-Mao-Original-Outgoing-Id: 575193213.31462-92804bf67652a0f2903a58c87e29ee27
Content-Transfer-Encoding: quoted-printable
Message-Id: <5774A58B-6CEC-4969-8C31-D4BDAE600D69@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> <640708E8-F80E-49EE-9AEF-DA8DAEE3AA57@tzi.org> <CABCOCHTNWz=VWZP3BzYxdBXTFytYyJjge2gX6fihz1B1Xf5bOQ@mail.gmail.com> <5D0AEDAC-4AD2-4DFD-BF19-EA210773EF66@tzi.org>
To: Andy Bierman <andy@yumaworks.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/wZhnNE2xmeaEHHWIbyDpQs1ccWE>
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: Mon, 25 Mar 2019 07:53:40 -0000

On Mar 25, 2019, at 07:23, Carsten Bormann <cabo@tzi.org> wrote:
> 
> We can maybe cheat:  Use strings for enums inside unions for now, and values only outside.

Or, if it takes too long to do the identifier scheme:
We could define SIDs for each module for the enum and bits strings used in that module.
That would mean we’d have multiple SIDs for the same strings all over the YANG universe, but it is something we don’t have to wait for and can do locally.

So a decoder knowing the module at all would also know what string to imagine (it never has to be reified!) for that SID.  An encoder has a slightly harder time, as it has to use a SID from a module the decoder will know; I’d imagine that won’t be too hard to glean from the context though.

Grüße, Carsten