[Yot] draft-ietf-core-comi-03, error in iPATCH payload

Michel Veillette <Michel.Veillette@trilliant.com> Tue, 26 June 2018 16:02 UTC

Return-Path: <Michel.Veillette@trilliant.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 A3421130E04 for <yot@ietfa.amsl.com>; Tue, 26 Jun 2018 09:02:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, 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 cxex6eI3mwtF for <yot@ietfa.amsl.com>; Tue, 26 Jun 2018 09:02:46 -0700 (PDT)
Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0104.outbound.protection.outlook.com [104.47.40.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1456F130EC7 for <yot@ietf.org>; Tue, 26 Jun 2018 09:02:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Trilliant.onmicrosoft.com; s=selector1-Trilliant-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eqTFQ9jjN8llcWv9BUzH45gQ4E0ddZHov3mMAr175Z8=; b=Zz1BL+etynCsR9csVq3ZeX1aYnVa5sdMXGno/Jwa0Kk6YE4kqpTaawuwIbZekOCiLc4/O5bjEdUBiHMicSgNjzuNw91L3ukAMP/2muXiVfu99CmGFCddoD4zAqmdJ5XD8s+CDBAbKoGrzgDHSxZXAIuRQncne4na9hEvvk9/7xs=
Received: from DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) by DM5PR06MB2714.namprd06.prod.outlook.com (10.168.199.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.24; Tue, 26 Jun 2018 16:02:43 +0000
Received: from DM5PR06MB2777.namprd06.prod.outlook.com ([fe80::f8bd:cd7c:eb9e:b248]) by DM5PR06MB2777.namprd06.prod.outlook.com ([fe80::f8bd:cd7c:eb9e:b248%12]) with mapi id 15.20.0884.025; Tue, 26 Jun 2018 16:02:43 +0000
From: Michel Veillette <Michel.Veillette@trilliant.com>
To: "yot@ietf.org" <yot@ietf.org>
Thread-Topic: draft-ietf-core-comi-03, error in iPATCH payload
Thread-Index: AdQNY35yrPtmhrFhT7+Ld1nVTZFKAQ==
Date: Tue, 26 Jun 2018 16:02:43 +0000
Message-ID: <DM5PR06MB2777ADB8D2491CE652C607379A490@DM5PR06MB2777.namprd06.prod.outlook.com>
Accept-Language: fr-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michel.Veillette@trilliant.com;
x-originating-ip: [207.96.192.122]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM5PR06MB2714; 7:hJQya+vszCWXZZdSmSTXFJeK2FJ92cIFz+t5o99+W8GC8+L/rpgecpigyQ2uq+g3/UiNNOjyIpNqylICSII/TEBP8MaB9deesGqowTBzS555zeyQV25j2duOM+R2PSBMI5F0XAshZFItCQRiWbkbB+k4ny6Ji7IT8UO/LA7pjb2KW5YzDmaKV41ZBS8HwmpSbQuhFalbFYFXelUREhBruDtCbAAz9qwm2p5GbDuYzo32mue8XHpv+rru1XOzNVaE
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: d56eefb4-4890-4b4b-ce69-08d5db7e4085
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:DM5PR06MB2714;
x-ms-traffictypediagnostic: DM5PR06MB2714:
x-microsoft-antispam-prvs: <DM5PR06MB27146129800812BC96FE2C249A490@DM5PR06MB2714.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM5PR06MB2714; BCL:0; PCL:0; RULEID:; SRVR:DM5PR06MB2714;
x-forefront-prvs: 071518EF63
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(366004)(39850400004)(376002)(346002)(396003)(199004)(189003)(6506007)(5250100002)(68736007)(102836004)(6436002)(186003)(316002)(33656002)(256004)(7696005)(97736004)(74316002)(26005)(55016002)(305945005)(99286004)(81166006)(8936002)(81156014)(9686003)(6306002)(5640700003)(1730700003)(966005)(72206003)(25786009)(476003)(486006)(14444005)(478600001)(7736002)(14454004)(8676002)(2501003)(2351001)(6916009)(6116002)(2906002)(5660300001)(53936002)(66066001)(3846002)(86362001)(2900100001)(105586002)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR06MB2714; H:DM5PR06MB2777.namprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: trilliant.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: luCvAsQl6vWlYitEzURdQNt4WGEszGqEs9hKzZeaPzJ123/dN/WYBEHSbge+6aHUAKvkDM442pORJDHvRpoPoEpwWOw0J1z+7MwcKyVJER/nvE3QRVdoemcLJ0Gul4DXgY3zy4DmWIMtxZfEIgRGSn7yQiZoHjZPHTSENA85Kum2zapDhLMQGhjAOAfo2xwJ7oZ45V1ZMB3LLYAl0M4rdSpa1iaC13vNR8b2krNXqSW7mjBjoY3cFvP+ti6ZVSZNfcq4L/Nn4DJ/31GDpTrh3Ea1zFanCHEksKUOQfGJ9I9drvbPZ3N7+87pbvVRW9RQoSTjaNj8zf3fsmEd284K49SvASwMMIwvv7K6x0fhIoY=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: Trilliant.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d56eefb4-4890-4b4b-ce69-08d5db7e4085
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2018 16:02:43.6095 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4f6fbd13-0dfb-4150-85c3-d43260c04309
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR06MB2714
Archived-At: <https://mailarchive.ietf.org/arch/msg/yot/RohQxqlfNqyO4FPNQ2fMo_gKCF0>
Subject: [Yot] draft-ietf-core-comi-03, error in iPATCH payload
X-BeenThere: yot@ietf.org
X-Mailman-Version: 2.1.26
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: Tue, 26 Jun 2018 16:02:50 -0000

In the example of section https://tools.ietf.org/html/draft-ietf-core-comi-03#section-5.3.4.1
The last entry of the ordered map is incorrect.

     +0,                                   / server (SID 1756) /
       {
         +3 : "tic.nrc.ca",                / name (SID 1759) /
         +4 : true,                        / prefer (SID 1760) /
         +5 : {                            / udp (SID 1761) /
           +1 : "132.246.11.231"           / address (SID 1762) /
         }
       }

This entry is supposed to add/update an entry in the  "/system/ntp/server" (SID 1756) YANG list.
SID 1756 is associated to the entire YANG list, not an instance of this list.
Based on https://tools.ietf.org/html/draft-ietf-core-yang-cbor-06#section-4.4, a YANG list is encoded using a CBOR array, not a CBOR MAP.

The proper way to add/update a YANG list entry is to use a instance-identifier which identify this list instance.
As defined in https://tools.ietf.org/html/draft-ietf-core-yang-cbor-06#section-6.13.1 and as referenced in https://tools.ietf.org/html/draft-ietf-core-yang-cbor-06#section-4.2.

   [+0, "tic.nrc.ca"], {                          / server (SID 1756) /
                         +3 : "tic.nrc.ca",       / name (SID 1759) /
                         +4 : true,               / prefer (SID 1760) /
                         +5 : {                   / udp (SID 1761) /
                           +1 : "132.246.11.231"  / address (SID 1762) /
                         }
                       }

This fix have been applied in GIT (https://core-wg.github.io/comi/draft-ietf-core-comi.txt)

Regards,
Michel