Re: [netconf] YANG encoding in CBOR

Ladislav Lhotka <lhotka@nic.cz> Mon, 25 March 2019 08:32 UTC

Return-Path: <lhotka@nic.cz>
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 00F4D1203C8; Mon, 25 Mar 2019 01:32:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7
X-Spam-Level:
X-Spam-Status: No, score=-7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 jOiLA_o0pfze; Mon, 25 Mar 2019 01:32:46 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (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 68B34120395; Mon, 25 Mar 2019 01:30:41 -0700 (PDT)
Received: from birdie (unknown [IPv6:2001:67c:370:128:e0e6:7446:b50f:deb9]) by mail.nic.cz (Postfix) with ESMTPSA id A2A2E633D3; Mon, 25 Mar 2019 09:30:39 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1553502639; bh=MbVdsq8Dbpd2AO3RlZhKCq0R2aLD9/ds8hAH6B0tC/k=; h=From:To:Date; b=RNkD8J+9s1QmrY/hk1aVV5B1OsKrRSStVrQKpNIHlP5mCdQ/XOzWwnNkFyjGYC9c4 m4QfmxOIDWKAd9LwpDCynBCwnz3o25J8c3yrHSIDENUJWAgJoBdAGr933iN9pFKrCO FmtFQmHtQiYgFN04ybdCFVtnDe89MuimgfTQENvY=
Message-ID: <44a564649dd1d9b8947483e8a7b94d71ddcbaa51.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Carsten Bormann <cabo@tzi.org>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Michel Veillette <Michel.Veillette@trilliant.com>, "netconf@ietf.org" <netconf@ietf.org>, "core@ietf.org" <core@ietf.org>
Date: Mon, 25 Mar 2019 09:30:39 +0100
In-Reply-To: <F099B29B-163F-460A-8B68-3DA266ECBA9E@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> <871s2vqsxi.fsf@nic.cz> <F099B29B-163F-460A-8B68-3DA266ECBA9E@tzi.org>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.32.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/XPDWXYHqoz4s-XiZbx2VCUirirM>
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: Mon, 25 Mar 2019 08:32:54 -0000

Carsten Bormann píše v Po 25. 03. 2019 v 09:12 +0100:
> On Mar 25, 2019, at 09:06, Ladislav Lhotka <lhotka@nic.cz>; wrote:
> > Perhaps the easiest way would be to use (optional) annotation that
> > specifies, using an ordinal number, which of the member types is used
> > for the particular instance. But since there can be unions inside
> > unions, a list of numbers would be needed in general.
> 
> Is the sequential number of the alternative supposed to be “stable”?
> (I.e., would there be confusion if an alternative is inserted in the middle?
> Which you may want to do while we still do “first match wins”.)

Inserting a new member type in the middle also affects the current algorithm for
union type resolution, so it is not permitted by the module update rules (sec.
11 in RFC 7950).

> 
> If yes, a list of those numbers may indeed be sufficient to always stay with
> values for CBOR.

And it is also a solution that works the same for any data representation, as
long as it can encode annotations.

Lada

> 
> Grüße, Carsten
> 
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67