Re: [core] js review of draft-ietf-core-yang-cbor-12

Carsten Bormann <cabo@tzi.org> Wed, 08 April 2020 08:50 UTC

Return-Path: <cabo@tzi.org>
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 A82AB3A0E64; Wed, 8 Apr 2020 01:50:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 VgAn3yh79xBT; Wed, 8 Apr 2020 01:49:57 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4F80B3A0E5F; Wed, 8 Apr 2020 01:49:56 -0700 (PDT)
Received: from [172.16.42.112] (p548DCD70.dip0.t-ipconnect.de [84.141.205.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 48xydb21kWz1069; Wed, 8 Apr 2020 10:49:55 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20200408065738.l7jnht536vxzacse@anna.jacobs.jacobs-university.de>
Date: Wed, 08 Apr 2020 10:49:53 +0200
Cc: Ivaylo Petrov <ivaylo@ackl.io>, NetMod WG <netmod@ietf.org>, core <core@ietf.org>
X-Mao-Original-Outgoing-Id: 608028593.513101-5d6b6b58aa325266491ef7540caa0229
Content-Transfer-Encoding: quoted-printable
Message-Id: <0817C3C8-420A-4994-89D4-2CDA150F682B@tzi.org>
References: <20200331110237.zbo3zw74xlccur3w@anna.jacobs.jacobs-university.de> <CAJFkdRwhxa2T-LVoYfwbMcjjo-dWhwonf_q4B6vGGLuWy5K+BA@mail.gmail.com> <20200407194758.luxnndxxsuixhzfo@anna.jacobs.jacobs-university.de> <16670AE8-DE0D-4444-9F64-ED6C67654886@tzi.org> <20200408065738.l7jnht536vxzacse@anna.jacobs.jacobs-university.de>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/21hprJYHBcdk7FqnuW7adjLrsEk>
Subject: Re: [core] js review of draft-ietf-core-yang-cbor-12
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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, 08 Apr 2020 08:50:01 -0000

Hi Jürgen,

> On 2020-04-08, at 08:57, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> 
> COMI defines:
> 
> application/yang-data+cbor
> application/yang-identifiers+cbor
> application/yang-instances+cbor
> 
> It seems that yang-data+cbor really is yang-data+cbor+sid

(We couldn’t use that syntax for the media type name, as +sid is not a structured syntax suffix, but I get the point.)

One way to build a content-type from a media-type name is to add a parameter:

application/yang-data+cbor; id=name
application/yang-data+cbor; id=sid

(In the CoAP content-format those content types would just be two different content-format numbers.)

But we could also encode that parameter in the media type name.
We would have to end the media type name with “+cbor”, because that is the structured syntax suffix that applies.

> and it seems
> there is no media type for yang-data+cbor+names (i.e., the CBOR
> encoding that uses names instead of SIDs as keys). The other two media
> types yang-identifiers+cbor and yang-instances+cbor seem to be COMI
> specific. Hence, me preference would be to define something like
> 
> application/yang-data+cbor+sid
> application/yang-data+cbor+name
> 
> in YANG-CBOR

That would put the normative reference to -sid back into YANG-CBOR.
Yes, we could do that.

Grüße, Carsten

PS.: The terminology for media types is a mess^W^W underdeveloped; see the expired https://tools.ietf.org/html/draft-bormann-core-media-content-type-format-01.txt for more info.

> and to leave the other two
> 
> application/yang-identifiers+cbor
> application/yang-instances+cbor
> 
> for COMI.