Re: [core] Comments on draft-ietf-core-yang-cbor-00

Ladislav Lhotka <lhotka@nic.cz> Wed, 25 May 2016 05:36 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CE63F12DA45 for <core@ietfa.amsl.com>; Tue, 24 May 2016 22:36:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.426
X-Spam-Level:
X-Spam-Status: No, score=-8.426 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, RP_MATCHES_RCVD=-1.426] 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 GYNMI7FPAyM3 for <core@ietfa.amsl.com>; Tue, 24 May 2016 22:36:13 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB3DC12DA41 for <core@ietf.org>; Tue, 24 May 2016 22:36:12 -0700 (PDT)
Received: from [IPv6:2001:718:1a02:1:b5a9:50ff:47cb:d443] (unknown [IPv6:2001:718:1a02:1:b5a9:50ff:47cb:d443]) by mail.nic.cz (Postfix) with ESMTPSA id 174F56083A; Wed, 25 May 2016 07:36:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1464154571; bh=imG/neZx7sf1XcoUaVL1VNzSboM3s6mwxfoaYwVwr2s=; h=From:Date:To; b=cgOJciR8Z5zzvCeQzyGDiV1gH94hLEg/VrOpskWXo/SxNcxu0PNMIAjHqCXYDfibd gwaUK2WVxzHfpsNtKFjad6XO7DTWatkKErWtefaZjuhQ3qDfl1UtOySOw8l6WNBxsD AK40kt2aQ8O60lm7W8SMyzgOk8Mc/EsJG0l3UHYo=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <etPan.5744797a.3c93c048.169de@tzi.org>
Date: Wed, 25 May 2016 07:36:12 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <E6D17E60-935D-4580-8593-86CFF08F4D91@nic.cz>
References: <CABCOCHRRACvVXx2S_hZm2TxbvP48aO4Q4REkh0LFjmHkMkZ1Vg@mail.gmail.com> <m2y473svm0.fsf@nic.cz> <57401CC2.2040002@tzi.org> <20160521112857.GA4437@elstar.local> <m2zirh81d8.fsf@birdie.labs.nic.cz> <20160524123613.GB9897@elstar.local> <AF6317CD-C9A7-4D7A-A80C-B2DBE0A210A9@nic.cz> <20160524142924.GB10130@elstar.local> <C6C84E10-70FB-4C47-8272-8018F99C2D0E@nic.cz> <etPan.5744797a.3c93c048.169de@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.3124)
X-Virus-Scanned: clamav-milter 0.98.7 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/hLAGGz1aHEhxgIhsibJ5vr-JSlo>
Cc: Core <core@ietf.org>
Subject: Re: [core] Comments on draft-ietf-core-yang-cbor-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 May 2016 05:36:15 -0000

> On 24 May 2016, at 17:55, Carsten Bormann <cabo@tzi.org> wrote:
> 
> On 24 May 2016 at 17:09:01, Ladislav Lhotka (lhotka@nic.cz) wrote:
>> <foo member-type="2">42</foo> 
> That brings up a question:
> 
> Are there any rules about the evolution of unions?
> 
> Can a YANG implementation rely on the relative position of union members staying the same over the evolution of modules?

Sec. 11 in 6020bis says that a type cannot be updated if it changes its semantics, which seems to be the case here.

> 
> Can a YANG implementation rely on a specific position in a union for what used to be the only permissible type in a previous version of a module?

Alternatively, the annotation could specify the member type by name, e.g.

   <host member-type="ietf-inet-types:ipv6-address">...</host>

and in JSON

"host": "..."
"@host": { "member-type": "ietf-inet-types:ipv6-address" }

Lada


> 
> Grüße, Carsten

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C