Re: [core] YANG list to CBOR mapping

peter van der Stok <stokcons@xs4all.nl> Tue, 24 November 2015 11:23 UTC

Return-Path: <stokcons@xs4all.nl>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 55A871B2FC8 for <core@ietfa.amsl.com>; Tue, 24 Nov 2015 03:23:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 LWdvARjncyy6 for <core@ietfa.amsl.com>; Tue, 24 Nov 2015 03:23:31 -0800 (PST)
Received: from lb1-smtp-cloud6.xs4all.net (lb1-smtp-cloud6.xs4all.net [194.109.24.24]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A1DF71B2FCA for <core@ietf.org>; Tue, 24 Nov 2015 03:23:29 -0800 (PST)
Received: from webmail.xs4all.nl ([194.109.20.199]) by smtp-cloud6.xs4all.net with ESMTP id lPPP1r00W4Hiz6i01PPP9h; Tue, 24 Nov 2015 12:23:27 +0100
Received: from [2001:983:a264:1:c0ea:4b3e:8dde:f751] by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Tue, 24 Nov 2015 12:23:23 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Date: Tue, 24 Nov 2015 12:23:23 +0100
From: peter van der Stok <stokcons@xs4all.nl>
To: Carsten Bormann <cabo@tzi.org>
Organization: vanderstok consultancy
Mail-Reply-To: consultancy@vanderstok.org
In-Reply-To: <565343DE.3050202@tzi.org>
References: <170106a36217a736a4b55991c4a5cf6a@xs4all.nl> <BLUPR06MB1763CC28443C787020D60CF7FE1A0@BLUPR06MB1763.namprd06.prod.outlook.com> <b02eb0119020ae52bbddfaed84dc1b01@xs4all.nl> <BLUPR06MB17633FB706D866D2C3E917B0FE070@BLUPR06MB1763.namprd06.prod.outlook.com> <565343DE.3050202@tzi.org>
Message-ID: <0d1cccf5e1784c3e6b97155c063e0015@xs4all.nl>
X-Sender: stokcons@xs4all.nl (s2F6XFB66LKGXbrGrS3yOV5W7deYLlSF)
User-Agent: XS4ALL Webmail
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/-NcIJKTUogbl_6lh769h2F__Vj0>
Cc: ana@ackl.io, Core <core@ietf.org>
Subject: Re: [core] YANG list to CBOR mapping
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: consultancy@vanderstok.org
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: Tue, 24 Nov 2015 11:23:33 -0000


Carsten Bormann schreef op 2015-11-23 17:50:
> Michel Veillette wrote:
>> Hi Peter
>> 
>> Have you defined an MergePatch() function similar to RFC 7396 section 
>> 2 for your proposed extension?
> 
> AFAIK, the function defined by RFC 7396 should "just work".
<pvds>
"just" is the word, for example CBOR allows more identifier types.
I would really like to encourage Carsten to write a CBOR-merge draft.
It looks useful in more and more applications.
</pvds>
> 
>> Do we intent to support two PATCH approaches, RFC 7396 style and 
>> draft-ietf-netconf-yang-patch style?
> 
> Good question.  yang-patch seems a bit more complicated than is needed
> for many constrained applications.  It also is not idempotent.
<pvds>
Their use is also very different.
The one is part of the transport format, the other is embedded in it.
</pvds>
> 
>> IF so, why list need to be supported by the RFC 7396 style since this 
>> approach provide a partial coverage (list without keys and user 
>> ordered list is not fully supported) ? Should we address list only in 
>> the draft-ietf-netconf-yang-patch style?
<pvds>
IMO user-ordered is orthogonal to keyed modifications.
Why punish keyed lists because non-keyed lists do not provide the 
required handles?
</pvds>
> 
> I would expect many constrained applications to make use of maps, which
> typically are represented in YANG as lists with keys*).  So I would
> prefer to be able to address these with a simple, merge-patch style
> update mechanism.
</pvds> so do I</pvds>
> 
> Grüße, Carsten
> 
> *) leaf-lists are a special case where updating isn't quite addressed
> yet by CoMI as far as I know.
<pvds> They represent the same characteristics as a JSON array.
In json-merge you change all array members or none.
Otherwise take refuge to the verbose RFC 6902 approach.
</pvds>