Re: [core] content-formats for cbor YANG

Michel Veillette <Michel.Veillette@trilliantinc.com> Thu, 20 April 2017 13:40 UTC

Return-Path: <Michel.Veillette@trilliantinc.com>
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 7983613145E for <core@ietfa.amsl.com>; Thu, 20 Apr 2017 06:40:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.922
X-Spam-Level:
X-Spam-Status: No, score=-1.922 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-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 iMNXByEICyL3 for <core@ietfa.amsl.com>; Thu, 20 Apr 2017 06:40:42 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0092.outbound.protection.outlook.com [104.47.36.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 952E9129AF7 for <core@ietf.org>; Thu, 20 Apr 2017 06:40:42 -0700 (PDT)
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=1EZr/k9bwA7kr3cl85PcsT3dW5iusdfvW8ecAM/9xik=; b=tsyQTU4WFcw1Eg723qMyGFojQMHEVXrv1yMjICP3E8GAA+XSiKfK+S8/xS0GL9Hcv2RZEA/soW80BLbRDWgFQXUK64rYDslsqNQVcaaskSoMH/+X8oCqtIeOLhll/UlABJE48UxfY1kbAXbJoYSME81SJWkoJpr8NCT5VhirlKI=
Received: from BN6PR06MB2308.namprd06.prod.outlook.com (10.173.19.139) by BN6PR06MB2308.namprd06.prod.outlook.com (10.173.19.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Thu, 20 Apr 2017 13:40:40 +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.01.1034.018; Thu, 20 Apr 2017 13:40:40 +0000
From: Michel Veillette <Michel.Veillette@trilliantinc.com>
To: Carsten Bormann <cabo@tzi.org>, peter van der Stok <consultancy@vanderstok.org>
CC: Core <core@ietf.org>
Thread-Topic: [core] content-formats for cbor YANG
Thread-Index: AQHSubKXN7UA6+6dAE+n0rfEL3aqF6HN9EUAgABIYfA=
Date: Thu, 20 Apr 2017 13:40:40 +0000
Message-ID: <BN6PR06MB230807D8EF9B69A473254077FE1B0@BN6PR06MB2308.namprd06.prod.outlook.com>
References: <c2b6fb6e92c6a5680e544963e88d5fa7@xs4all.nl> <09BD739F-89A1-4DA7-9006-E30AEAEE581E@tzi.org>
In-Reply-To: <09BD739F-89A1-4DA7-9006-E30AEAEE581E@tzi.org>
Accept-Language: fr-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: tzi.org; dkim=none (message not signed) header.d=none;tzi.org; dmarc=none action=none header.from=trilliantinc.com;
x-originating-ip: [207.96.192.122]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN6PR06MB2308; 7:jkUKH6/PpP+HMTX5XkQSMsleA1ZqBgGJuElFJoTfw7Jc0NUKeLsrkRBhaW9D5G0Xjo+DU8r2JdK1r948WA8JsuRwui9JSfCqlX1KnyYswfZDx7dcv8GzhHtM9ZPr6hlZhpAbDsLCKRnUFBRFR15EBlZye+hLm4sKra0Wm+GWSD0Y0tPQ0xfk2kyhk8Q4H9lfddiJ8thLyamd4qKBqPpvwr/5jlCJjMw6OhMhCHAzCQ/puzRJx/ypk8s1bYLTA0oo9jQFTccczhJHhDxtq4cDTNYT/nCdt5l/h2QcsJIBW9AcqSDx+yHheVS4vHKxht8WlxTBcRLkwOh8bxCOHHY9Kg==
x-ms-office365-filtering-correlation-id: 75bc6695-1295-40a8-52d5-08d487f2d5e9
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN6PR06MB2308;
x-microsoft-antispam-prvs: <BN6PR06MB230876A7CA07860E570D4265FE1B0@BN6PR06MB2308.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BN6PR06MB2308; BCL:0; PCL:0; RULEID:; SRVR:BN6PR06MB2308;
x-forefront-prvs: 02830F0362
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39450400003)(39840400002)(39400400002)(24454002)(377454003)(6246003)(3846002)(6116002)(53936002)(102836003)(9686003)(229853002)(50986999)(3660700001)(76176999)(5660300001)(74316002)(33656002)(66066001)(55016002)(86362001)(7696004)(6306002)(2900100001)(3280700002)(99286003)(122556002)(6436002)(8676002)(38730400002)(305945005)(7736002)(81166006)(77096006)(8936002)(189998001)(6506006)(54356999)(2906002)(25786009)(4326008)(53546009)(2950100002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR06MB2308; H:BN6PR06MB2308.namprd06.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
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-originalarrivaltime: 20 Apr 2017 13:40:40.4564 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4f6fbd13-0dfb-4150-85c3-d43260c04309
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR06MB2308
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/T7yV7dPTs8sCGB0TKvRTF2Gk1X4>
Subject: Re: [core] content-formats for cbor YANG
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 20 Apr 2017 13:40:45 -0000

Hi Peter, Hi Carsten

The following table summarizes the different payload uses by CoMI.
'value' is defined in https://tools.ietf.org/html/draft-ietf-core-yang-cbor-04#section-4
'instance-identifier' is defined in https://tools.ietf.org/html/draft-ietf-core-yang-cbor-04#section-5.13.1

Use Case	                  | Request payload                         | Response payload
----------------------------------+-----------------------------------------+----------------------------------------
GET /c/instance-identifier        | na                                      | value
PUT /c/instance-identifier        | value                                   | na
POST /c/instance-identifier       | value                                   | na
DELETE /c/instance-identifier     | na                                      | na
GET /c                            | na                                      | CBOR array (instance-identifier, value)
PUT /c	                          | CBOR array (instance-identifier, value) | na
POST /c	                          | CBOR array (instance-identifier, value) | na
FETCH /c                          | CBOR array (instance-identifier)        | CBOR array (value)
iPATCH/c                          | CBOR array (instance-identifier, value) | na
POST /c/instance-identifier (RPC) | value                                   | value
GET /s (Notification)             | value or CBOR array (value)             | na

As you can see, the payload of a iPATCH /c request have the same format a PUT /c request, POST /c request and GET /c response.
What will be the rational to use a different Content-Format for the iPATCH?
Can we simply use (Content-Format: application/cbor) in all cases?

Quick note, draft-ietf-core-yang-cbor don't propose any Content-Format, this is left to  draft-ietf-core-comi.

Regards,
Michel

-----Original Message-----
From: core [mailto:core-bounces@ietf.org] On Behalf Of Carsten Bormann
Sent: Thursday, April 20, 2017 4:55 AM
To: peter van der Stok <consultancy@vanderstok.org>
Cc: Core <core@ietf.org>
Subject: Re: [core] content-formats for cbor YANG


> On Apr 20, 2017, at 10:46, peter van der Stok <stokcons@xs4all.nl> wrote:
> 
> Hi Core,
> 
> Following the discussion on CoMI content-formats during ietf98, I want to propose the following;
> 
> Draft-ietf-core-yang-cbor deines the content-format application/yang+cbor which defines CBOR documents which contain the results of the mapping of a YANG document to CBOR as specified in the draft.
> 
> Draft-ietf-core-comi defines two additional content-formats:
> 1) application/yang-fetch+cbor that specifies the contents and semantics of a FETCH CoMI request payload
> 2) application/yang-patch+cbor that specifies the contents and semantics of a PATCH CoMI request payload
> 
> Looking forward to alternative proposals or noises of approval.

Sounds very good to me.

Grüße, Carsten

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