Re: [core] content-formats for cbor YANG

Michel Veillette <Michel.Veillette@trilliantinc.com> Fri, 21 April 2017 15:49 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 97826129528 for <core@ietfa.amsl.com>; Fri, 21 Apr 2017 08:49:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, 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 j0lhePP9CMlo for <core@ietfa.amsl.com>; Fri, 21 Apr 2017 08:49:22 -0700 (PDT)
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0125.outbound.protection.outlook.com [104.47.38.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CFA0C12954D for <core@ietf.org>; Fri, 21 Apr 2017 08:49:21 -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=8VqL2P8SLGtI0Df+LaAovmr6wb6f1pZmXUuiO0Y30Og=; b=TKzitbppC/UifmJvfUpfyNyq778zWGvXEdUhORg4PW7DswqncTtCDoJxUhqD/TvdwClC845yplAEh/Xd9BOps+GgRmFUzArdTFMOlKK6dCUg8z5+IIthyHXelMEQNnLXL4TKvYE4Vl+i7x3HiQlxqDAy1BVJYtMgXMYq0zGQs8Y=
Received: from MWHPR06MB2317.namprd06.prod.outlook.com (10.168.246.147) by MWHPR06MB2317.namprd06.prod.outlook.com (10.168.246.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Fri, 21 Apr 2017 15:49:18 +0000
Received: from MWHPR06MB2317.namprd06.prod.outlook.com ([10.168.246.147]) by MWHPR06MB2317.namprd06.prod.outlook.com ([10.168.246.147]) with mapi id 15.01.1034.018; Fri, 21 Apr 2017 15:49:18 +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+n0rfEL3aqF6HN9EUAgABIYfCAABcJAIAAGQHggAAJIICAAAMmQIAAFdEAgADc44CAABxwAIAAUvHA
Date: Fri, 21 Apr 2017 15:49:18 +0000
Message-ID: <MWHPR06MB23176EC227CEC5E03B482F14FE1A0@MWHPR06MB2317.namprd06.prod.outlook.com>
References: <c2b6fb6e92c6a5680e544963e88d5fa7@xs4all.nl> <09BD739F-89A1-4DA7-9006-E30AEAEE581E@tzi.org> <BN6PR06MB230807D8EF9B69A473254077FE1B0@BN6PR06MB2308.namprd06.prod.outlook.com> <063c4a22d221667a92b180e5dce7ea1f@xs4all.nl> <BN6PR06MB2308B088FCC1DE8AD1370C4FFE1B0@BN6PR06MB2308.namprd06.prod.outlook.com> <102478F5-703D-46C0-9A0B-A21454F940DB@tzi.org> <BN6PR06MB23088F3C7FB189B774466177FE1B0@BN6PR06MB2308.namprd06.prod.outlook.com> <091EF847-AD5E-40D8-B04C-CDBDA47023F1@tzi.org> <8ff54501447ab9e681ecfbee04652fb3@xs4all.nl> <F5C2B33D-56DF-49E6-9EE9-8B2E4A4BADD3@tzi.org>
In-Reply-To: <F5C2B33D-56DF-49E6-9EE9-8B2E4A4BADD3@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; MWHPR06MB2317; 7:W4gnlKlFS1RVwcdrGy5lKqlw+FJ30+DxwYbNvGK9c+WwmKeofATeBR19BuPT2eusQmh01K3ikpzooOQX7V4hi4V2EBJxKo30aMKmQzO69LG0+NSrHxbUsrtnpS2nwC6foApB3w+KpjhAxWv9uNAPIMhG33RXQKy37TIUpnVi4WRCwKPHk//mp+xZJxD+eulNc+1oPWxR1mOcWaKCOqW6IKV9FmMm2hHls8MQYjJi8/bJNGOYjXB5D+yotykfGbp2cp9V69erghB8R3F60U2XC4mf8IjbkM1lH05xeOATGRwxlcNZLQJV41XeKjwjHpCbx2hYw2SHp88vc8GG49WjvA==
x-ms-office365-filtering-correlation-id: 66d77ccf-afaa-4bbf-4dab-08d488cdf89c
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR06MB2317;
x-microsoft-antispam-prvs: <MWHPR06MB23173D9FAD5895B997355175FE1A0@MWHPR06MB2317.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(6072148); SRVR:MWHPR06MB2317; BCL:0; PCL:0; RULEID:; SRVR:MWHPR06MB2317;
x-forefront-prvs: 02843AA9E0
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39410400002)(39450400003)(39400400002)(39840400002)(24454002)(13464003)(377454003)(7696004)(74316002)(7736002)(6506006)(99286003)(305945005)(86362001)(8936002)(6436002)(55016002)(229853002)(77096006)(8676002)(33656002)(5660300001)(122556002)(6246003)(81166006)(2950100002)(53936002)(50986999)(66066001)(2900100001)(54356999)(9686003)(76176999)(38730400002)(4326008)(6116002)(102836003)(3846002)(3280700002)(3660700001)(189998001)(93886004)(25786009)(53546009)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR06MB2317; H:MWHPR06MB2317.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: 21 Apr 2017 15:49:18.4536 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4f6fbd13-0dfb-4150-85c3-d43260c04309
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR06MB2317
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/A4TLvOt3E5bbm5XlmOjyB3s3l_U>
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: Fri, 21 Apr 2017 15:49:25 -0000

Hi Peter

About "payload of an array of one item can be optimized to just one item"

I agree with Carsten, I most cases, this rule have the potential to create ambiguities.
In the specific case of a notification, the payload can be either a CBOR map (single notification) or a CBOR array (multiple notifications).
A single Content-Format (e.g. yang-value+cbor) will work but a solution with two Content-Format seem to be cleaner.

Regards,
Michel

-----Original Message-----
From: Carsten Bormann [mailto:cabo@tzi.org] 
Sent: Friday, April 21, 2017 5:01 AM
To: peter van der Stok <consultancy@vanderstok.org>
Cc: Michel Veillette <Michel.Veillette@trilliantinc.com>; Core <core@ietf.org>
Subject: Re: [core] content-formats for cbor YANG

On Apr 21, 2017, at 09:18, peter van der Stok <stokcons@xs4all.nl> wrote:
> 
> Because the CoMI text now says that the payload of an array of one 
> item can be optimized to just one item, I like to suppress the 
> yang-value+cbor and only retain the yang-values+cbor

That would create an ambiguity if a value can ever be an array.

What is so bad about the media type being very specific about what the payload is?

Grüße, Carsten