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

Michel Veillette <Michel.Veillette@trilliantinc.com> Thu, 08 February 2018 16:08 UTC

Return-Path: <Michel.Veillette@trilliantinc.com>
X-Original-To: yot@ietfa.amsl.com
Delivered-To: yot@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2E01512D77B for <yot@ietfa.amsl.com>; Thu, 8 Feb 2018 08:08:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=trilliant.onmicrosoft.com
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 UOcoZwEgu56R for <yot@ietfa.amsl.com>; Thu, 8 Feb 2018 08:08:29 -0800 (PST)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0720.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::720]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 661C4126E64 for <yot@ietf.org>; Thu, 8 Feb 2018 08:08:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Trilliant.onmicrosoft.com; s=selector1-trilliantinc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GSt9bO9A17S33xNeRWXVjCibVvCCKGgyf+glPLlf/Hs=; b=yUja8JpNpUxXuZ42M9kUaXiui5DQpYnQUjAJht1v2Tzy1yKVVv96AT3Ql7nnMkB525NIXBL1kJSx4S+Z4xQEHJ/UhlKUDJ+C9SBIW+QfF/V2Fvy3dzXjsIY4WJi2jD1/UO6CWclFcU1Fhiu+t2xxaQeMd4tZEOH/V7AN9WFYXic=
Received: from BN6PR06MB2308.namprd06.prod.outlook.com (10.173.19.139) by BN6PR06MB3505.namprd06.prod.outlook.com (10.175.131.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Thu, 8 Feb 2018 16:08:27 +0000
Received: from BN6PR06MB2308.namprd06.prod.outlook.com ([10.173.19.139]) by BN6PR06MB2308.namprd06.prod.outlook.com ([10.173.19.139]) with mapi id 15.20.0464.016; Thu, 8 Feb 2018 16:08:27 +0000
From: Michel Veillette <Michel.Veillette@trilliantinc.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "yot@ietf.org" <yot@ietf.org>, Michael Richardson <mcr@sandelman.ca>
Thread-Topic: [Yot] [I-D.ietf-core-yang-cbor] update
Thread-Index: AdOez0RGPQnnYRokTwS4PtRiwEkZ0gCJVzgAAAA0cHA=
Date: Thu, 08 Feb 2018 16:08:26 +0000
Message-ID: <BN6PR06MB23086DD7AA436AB8733EC95BFEF30@BN6PR06MB2308.namprd06.prod.outlook.com>
References: <BN6PR06MB230801BB8CBE448B3DBA2969FEFE0@BN6PR06MB2308.namprd06.prod.outlook.com> <FB2014BB-869A-4B26-846A-1181B7A3401A@tzi.org>
In-Reply-To: <FB2014BB-869A-4B26-846A-1181B7A3401A@tzi.org>
Accept-Language: fr-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [207.96.192.122]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN6PR06MB3505; 7:cIMrxdFgC3jRlGVViphPCoRpbzeAyExIXYGu/x+gPym04Bce5hpypZTcHdYmsClm0Qx0n5dF0ZKje5cwuykzUKPdRoye4rkHvX3tRlFO2DHtZnUk3zhTK6gz+0yVVvFUztSSuO8z8nVb18PIfBbTSbga8UdxXe4LGStv14cug3obw12nY3QByORPvtnt5xxhFcrYejEpuniK9ZQ3nn2bX/v/wrcECCoqtDTaXUXWtqZtK+MvwmTnGDW6tVZqQu6n
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: c72b8915-6d89-434f-ac35-08d56f0e301c
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:BN6PR06MB3505;
x-ms-traffictypediagnostic: BN6PR06MB3505:
x-microsoft-antispam-prvs: <BN6PR06MB350538E8B5C0D77C58445255FEF30@BN6PR06MB3505.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6041288)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR06MB3505; BCL:0; PCL:0; RULEID:; SRVR:BN6PR06MB3505;
x-forefront-prvs: 0577AD41D6
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39380400002)(346002)(39850400004)(376002)(396003)(189003)(199004)(13464003)(6506007)(53936002)(9686003)(6306002)(55016002)(6246003)(6436002)(2900100001)(66066001)(33656002)(99286004)(105586002)(7696005)(3846002)(6116002)(86362001)(8936002)(2906002)(54906003)(5660300001)(106356001)(2950100002)(316002)(6916009)(186003)(77096007)(26005)(7736002)(8676002)(81156014)(15650500001)(81166006)(76176011)(305945005)(3280700002)(966005)(3660700001)(102836004)(59450400001)(74316002)(53546011)(25786009)(97736004)(4326008)(6346003)(478600001)(68736007)(72206003)(229853002)(14454004); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR06MB3505; H:BN6PR06MB2308.namprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: trilliantinc.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michel.Veillette@trilliantinc.com;
x-microsoft-antispam-message-info: SQUMhWgiqouuGDTBHqcja9UQuP7j/C6DQjrs48U6o+sQcLNPjtGn82+ifCXe2qwQ3OYKw6+Mm/tnzi/tsunvkg==
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: trilliantinc.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c72b8915-6d89-434f-ac35-08d56f0e301c
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2018 16:08:26.9735 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4f6fbd13-0dfb-4150-85c3-d43260c04309
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR06MB3505
Archived-At: <https://mailarchive.ietf.org/arch/msg/yot/4zFCA7VICLR7JRL5MPhVziVVdBs>
Subject: Re: [Yot] [I-D.ietf-core-yang-cbor] update
X-BeenThere: yot@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Yang of Things <yot.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yot>, <mailto:yot-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yot/>
List-Post: <mailto:yot@ietf.org>
List-Help: <mailto:yot-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yot>, <mailto:yot-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Feb 2018 16:08:34 -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:yot-bounces@ietf.org] On Behalf Of Carsten Bormann
Sent: Thursday, February 8, 2018 10:51 AM
To: Michel Veillette <Michel.Veillette@trilliantinc.com>
Cc: yot@ietf.org; Michael Richardson <mcr@sandelman.ca>
Subject: Re: [Yot] [I-D.ietf-core-yang-cbor] update

On Feb 5, 2018, at 23:25, Michel Veillette <Michel.Veillette@trilliantinc.com> wrote:
> 
> 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.

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

_______________________________________________
Yot mailing list
Yot@ietf.org
https://www.ietf.org/mailman/listinfo/yot