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

From: Michel Veillette <[email-masked]>
Date: Tue, 26 Jun 2018 16:02:43 +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