Re: [core] CBOR Encoding of Data Modeled with YANG

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Wed, 09 December 2015 09:14 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 5D4CC1B2AD6 for <core@ietfa.amsl.com>; Wed, 9 Dec 2015 01:14:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.86
X-Spam-Level:
X-Spam-Status: No, score=-3.86 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] 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 FNt6-FXBBLSr for <core@ietfa.amsl.com>; Wed, 9 Dec 2015 01:14:41 -0800 (PST)
Received: from atlas3.jacobs-university.de (atlas3.jacobs-university.de [212.201.44.18]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9DCEF1B2AD5 for <core@ietf.org>; Wed, 9 Dec 2015 01:14:41 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas3.jacobs-university.de (Postfix) with ESMTP id C652F10FB; Wed, 9 Dec 2015 10:14:39 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas3.jacobs-university.de ([10.70.0.220]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10030) with ESMTP id rWqo7e1Efrkl; Wed, 9 Dec 2015 10:14:38 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas3.jacobs-university.de (Postfix) with ESMTPS; Wed, 9 Dec 2015 10:14:38 +0100 (CET)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id 7532020058; Wed, 9 Dec 2015 10:14:38 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id V1iT1AdnCKaK; Wed, 9 Dec 2015 10:14:37 +0100 (CET)
Received: from elstar.local (elstar.jacobs.jacobs-university.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 27D0C20056; Wed, 9 Dec 2015 10:14:37 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id 33F0C392A87F; Wed, 9 Dec 2015 10:14:35 +0100 (CET)
Date: Wed, 09 Dec 2015 10:14:35 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: consultancy@vanderstok.org
Message-ID: <20151209091433.GA23236@elstar.local>
Mail-Followup-To: consultancy@vanderstok.org, Andy Bierman <andy@yumaworks.com>, Alexander Pelov <a@ackl.io>, Core <core@ietf.org>
References: <5666AE1A.2040908@ackl.io> <20151208105530.GA62785@elstar.local> <64B950CF-863D-4440-AF7A-F8DF79C80409@telecom-bretagne.eu> <20151208115310.GA62928@elstar.local> <5666D6D4.3090006@ackl.io> <20151208140158.GA21630@elstar.local> <5666EF1F.6090204@ackl.io> <20151208151402.GA21810@elstar.local> <CABCOCHRnojCtSfAKYsDjy5mNygco=3Kj5QMN6r=6-efKWiyYGA@mail.gmail.com> <aa16626dd11ae62fedf95c2cfd1f3d9d@xs4all.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <aa16626dd11ae62fedf95c2cfd1f3d9d@xs4all.nl>
User-Agent: Mutt/1.4.2.3i
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/0OM06Ik05jRZSkYHJVPd1lby1PU>
Cc: Core <core@ietf.org>
Subject: Re: [core] CBOR Encoding of Data Modeled with YANG
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
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, 09 Dec 2015 09:14:44 -0000

On Wed, Dec 09, 2015 at 09:55:20AM +0100, peter van der Stok wrote:
> Hi Juergen,
> 
> Can we concentrate on the YANG to CBOR mapping and the representation of 
> the YANG names?

We do.

> Can you explain to me where the problem lies exactly?

Here is an example:

  3.1.15. YANG type: container

  A container MUST be encoded using a CBOR map data item (major type
  5). A map is comprised of pairs of data items, with each data item
  consisting of a key and a value. CBOR map keys MUST be encoded using
  a CBOR unsigned integer (major type 0) and set to a data node ID or
  a fully-qualified data node ID. Data node IDs MUST be used when a
  parent node exists and this parent shares the same module ID as the
  current data node. CBOR map values MUST be encoded using the rules
  associated with the data node type.

This can't be implemented since it is unclear what a data node ID is.

> If the YANG to CBOR mapping (Y2C) depends on the n bit
> representations of the YANG names, we have interesting consequences
> for inter-operability.

The I-D that started this thread apparently assumes CBOR unsigned
integer (major type 0) as names and without defining how these numbers
are generated, the I-D is incomplete.

> In my opinion a Y2C mapping should include YANG name strings and
> their n bit identifiers because they will both be present; although
> not in the same payload.

I commented on <https://core-wg.github.io/yang-cbor/> and I think this
document has problems. That's all.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>