[core] YANG to CBOR mapping version 1

peter van der Stok <stokcons@xs4all.nl> Tue, 05 July 2016 09:50 UTC

Return-Path: <stokcons@xs4all.nl>
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 7FE7112D0FA for <core@ietfa.amsl.com>; Tue, 5 Jul 2016 02:50:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.621
X-Spam-Level:
X-Spam-Status: No, score=-2.621 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 unwUz8CsqyR5 for <core@ietfa.amsl.com>; Tue, 5 Jul 2016 02:50:42 -0700 (PDT)
Received: from lb2-smtp-cloud3.xs4all.net (lb2-smtp-cloud3.xs4all.net [194.109.24.26]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 64B1312D17B for <core@ietf.org>; Tue, 5 Jul 2016 02:50:41 -0700 (PDT)
Received: from webmail.xs4all.nl ([194.109.20.212]) by smtp-cloud3.xs4all.net with ESMTP id Exqf1t00b4aYjWA01xqf5g; Tue, 05 Jul 2016 11:50:39 +0200
Received: from AMontpellier-654-1-248-197.w92-133.abo.wanadoo.fr ([92.133.19.197]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Tue, 05 Jul 2016 11:50:39 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Date: Tue, 05 Jul 2016 11:50:39 +0200
From: peter van der Stok <stokcons@xs4all.nl>
To: Core <core@ietf.org>
Organization: vanderstok consultancy
Mail-Reply-To: consultancy@vanderstok.org
Message-ID: <1ed9a5d16aca7d13412259e94afc1aa2@xs4all.nl>
X-Sender: stokcons@xs4all.nl (uhqHjSNd2tttqaLrpGjkY5/XlZzl7f0Y)
User-Agent: XS4ALL Webmail
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/0RiuKx3DbD5zg-BM7JsJOmKmuO8>
Subject: [core] YANG to CBOR mapping version 1
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
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, 05 Jul 2016 09:50:45 -0000

Hi authors,

Attached my review of the document.
I have not looked at the enum, union encoding as this was done by Andy.

______________________________________________________________________________
YANG to CBOR
Section 1 line 2; remove “only”
Page 5; the table is referenced nowhere
End of section 2.1 “Deltas are represented as positive number” is 
contradicted in section 4.2 “SIDs as keys” second bullet: “Clients and 
servers MUST support negative deltas.
Suggestion: Deltas are represented as numbers preceded by a + or – sign
End page 5: “value need” -> “value needs”
Section 3: “the specification supports three types of keys.”
I would suggest only 2: character strings and numbers.
The use of deltas is either application (CoOL) specific or YANG to CBOR 
mapping specific.
If it is YANG to CBOR specific, I would encourage the use of another 
CBOR type that specifies a delta. As specified here its use is 
ambiguous; and forces each application to specify explicitly what is 
meant.
In the case that the delta is CoOL specific, I recommend to remove it 
completely from this draft, and explain the use of Deltas in the 
appropriate CoOL draft.
In the latter case: What remains are two key types: number and character 
string.
Last alinea of section 3: “entities generating” should that not be” 
agents (processes) generating”…
“The CoAP content-Format Option …. In the first place.”  I don’t 
understand this phrase.
Section 4.2 title:  ‘container” Schema Node. Is “CBOR map key” not a 
better title?
As suggested earlier: Reduce this to string (major type 3) and number 
(major type 0) keys.
I think that a large number of the CBOR encoding examples in section 4.2 
can be left out. They can be generated any time by an interested 
implementer; and now confuse the issues.
Section 4.4; the example is really complex; some explanation what this 
all illustrates would be welcome. Why is the use of choice necessary to 
understand the list encoding? The CBOR encoding can be removed. I 
suggest to first present the names example followed by the number 
example. The hash example is really not needed (see above).
Section 5: I need more explanation to relate the instance examples to 
the type definitions.
For example section 5.1; does the 1280 come from {mtu: 1280} ? Here we 
do need the CBOR encoding to see the relation between the type 
specification and the CBOR encoding.
Section 5.2 example illustrates major type 1? Not immediately clear 
unless you decode the CBOR.
Section 5.3; Start phrase got lost 3 lines lower.
In the example, where do I find in the CBOR encoding that the fraction 
is 2 digits?
Sections 5.4 - 5.8; see comments on section 5.1
Section 5.9 Here more text is needed to connect the complex YANG 
specification to “eth1” value.
Section 5.10; what is a name-space qualified form? In YANG-JSON it is 
defined but may need some repetition here.
Why is the subject SIDs as identityref* split in two parts? And again I 
find the CBOR encoding difficult to relate to the definition example.
Section 5.11
CBOR diagnostic is: {isrouter: [null]} ?
Section 5.13.
I don’t understand how this section relates to YANG to CBOR mapping. If 
the section refers to specifying an instance identifier in the request, 
I think it can be removed. The use of [key=value] as instance identifier 
is well explained in restconf draft. The use of numeric identifier is 
currently described in CoMI draft, and differently in CoOL draft. I 
propose to remove this section as it does not directly relate to CBOR 
encoding.

However, I am missing how to transport a given list instance with its 
key values in the CBOR encoding. Section 4.4 describes the encoding of a 
complete list not a subset of its instances.

_____________________________________________________________________________________________
Hope this helps,
Peter


-- 
Peter van der Stok
vanderstok consultancy
mailto: consultancy@vanderstok.org