Subject: [Yot] [I-D.ietf-core-yang-cbor] update

From: Michel Veillette <[email-masked]>
Date: Mon, 5 Feb 2018 22:25:20 +0000

Draft [I-D.ietf-core-yang-cbor] have been updated to support YANG data templates defined using the yang-data extension. YANG data templates are used by CoMI to define the CoAP error payload and in [I-D.richardson-anima-ace-constrained-voucher-02] to define a voucher encoded in CBOR.

The updated version is available for review in github
http://core-wg.github.io/yang-cbor/draft-ietf-core-yang-cbor-latest.txt

The following link show a diff between the github version and the last IETF version
https://tools.ietf.org/tools/rfcdiff/rfcdiff.pyht?url1=http://core-wg.github.io/yang-cbor/draft-ietf-core-yang-cbor-latest.txt&url2=https://www.ietf.org/id/draft-ietf-core-yang-cbor-05.txt

Note: Please send me your comments tomorrow for inclusion prior to the cut off date.

Michel Veillette
System Architecture Director
Trilliant Inc.
Tel: 450-531-3109
https://trilliantinc.com/

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 8 Feb 2018 16:51:06 +0100

> Draft [I-D.ietf-core-yang-cbor] have been updated to support YANG data templates defined using the yang-data extension. YANG data templates are used by CoMI to define the CoAP error payload and in…

So how do we handle the media types (content-formats) for this?

Obviously, specifications that make heavy use of yang-data may want to define their own media types.
On the other hand, the top level SID is already useful for finding out what yang module is being used, so defining a generic media type for yang-data in CBOR (like the ones defined as “application/yang-data+xml” and “application/yang-data+json” in RFC 8040) would make sense.

Grüße, Carsten

---

From: Michel Veillette <[email-masked]>
Date: Thu, 8 Feb 2018 16:08:26 +0000

Hi Carsten

The definition of yang-data in https://tools.ietf.org/html/rfc8040#section-8 seem to answer your question.
See second paragraph.

         "This extension is used to specify a YANG data template that
          represents conceptual data defined in YANG.  It is
          intended to describe hierarchical data independent of
          protocol context or specific message-encoding format.
          Data definition statements within a yang-data extension
          specify the generic syntax for the specific YANG data
          template, whose name is the argument of the 'yang-data'
          extension statement.

          Note that this extension does not define a media type.
          A specification using this extension MUST specify the
          message-encoding rules, including the content media type.

          ...

In the case of the error payload in CoMI, the Content-Format is currently (application/yang-value+cbor).
https://tools.ietf.org/html/draft-ietf-core-comi-02#section-9
However, this old CoMI version defines a YANG container instead of a template.
When updated to YANG template, I assume that the Content-Format need to be replaced by (application/cbor).

Regards,
Michel

-----Original Message-----
From: Yot [mailto:[email-masked]] On Behalf Of Carsten Bormann
Sent: Thursday, February 8, 2018 10:51 AM
To: Michel Veillette <[email-masked]>
Cc: [email-masked]; Michael Richardson <[email-masked]>
Subject: Re: [Yot] [I-D.ietf-core-yang-cbor] update

Grüße, Carsten

_______________________________________________
Yot mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/yot