[core] draft-ietf-core-sid-19: some comments

Jernej Tuljak <jernej.tuljak@mg-soft.si> Fri, 24 February 2023 11:52 UTC

Return-Path: <jernej.tuljak@mg-soft.si>
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 9CC28C169524 for <core@ietfa.amsl.com>; Fri, 24 Feb 2023 03:52:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mg-soft.si
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pJ_sjcfSWg-M for <core@ietfa.amsl.com>; Fri, 24 Feb 2023 03:52:18 -0800 (PST)
Received: from galileo.mg-soft.si (gate.mg-soft.si [212.30.73.66]) by ietfa.amsl.com (Postfix) with ESMTP id C8318C16953F for <core@ietf.org>; Fri, 24 Feb 2023 03:52:16 -0800 (PST)
Received: from [10.0.0.222] (tp-x61t.mg-soft.si [10.0.0.222]) by galileo.mg-soft.si (Postfix) with ESMTP id E832BC41D794 for <core@ietf.org>; Fri, 24 Feb 2023 12:52:14 +0100 (CET)
DKIM-Filter: OpenDKIM Filter v2.11.0 galileo.mg-soft.si E832BC41D794
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mg-soft.si; s=default; t=1677239534; bh=Jvng3W/CIY0SJ+tMNmFETWco+1E9Q1awxHtAoNLW4RU=; h=Date:From:Subject:To:From; b=oOSu3PSHSGKa4TdkYEcbM9wY2GgasVWeT1xTLaAMmelh4CZlR9Spq4lID5DZ+EVlN XXR5eo6tnAa7rSlAODbVf/B/wsARyniR5TqQRZi97LZ7VMvu4ZEzyJSQGMryXuc4JC nj1VnWpd1r0TtFsnAoBvmlKYlKK5JULVi1QSNQMOSoRZzSe2W5xZ+kuwBrAHgygebF ijzACNLu6DstC1taFwUYXYJPPOs57U8b6omi74yQt9MUdiM55+lfR2Xgg6sjz1oivD P2ErGScOnNpAPz15Rp012iVDGxS5OAN5/A3RXAiKndpkbskgbJ5OKvWTQvQssfhue3 Xe6tnqbQQatHw==
Message-ID: <f9a4b15a-fb05-ba60-f852-640dcb8ead58@mg-soft.si>
Date: Fri, 24 Feb 2023 12:52:14 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2
From: Jernej Tuljak <jernej.tuljak@mg-soft.si>
To: core@ietf.org
Content-Language: en-US
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/SU-ezE0MPiiPv0qA4zVZnTAR57k>
Subject: [core] draft-ietf-core-sid-19: some comments
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.39
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, 24 Feb 2023 11:52:22 -0000

Hi,

1.) In Section 4. (".sid" file format), draft-ietf-core-sid-19 says:

    The following YANG module defines the structure of this file,
    encoding is performed in JSON [RFC8259] using the rules defined in
    [RFC7951].

There are several YANG leaf statements in this YANG module that use the 
"uint64" built-in type. RFC7951 states that integer values that 
correspond to this YANG type are encoded as JSON strings (see Section 
6.1 (Numeric Types) of RFC7951):

    A value of the "int64", "uint64", or "decimal64" type is represented
    as a JSON string whose content is the lexical representation of the
    corresponding YANG type as specified in Sections 9.2.1 and 9.3.1 of
    [RFC7950].

    For example, if the type of the leaf "foo" in Section 5.1 was
    "uint64" instead of "uint8", the instance would have to be encoded as

    "foo": "123"

    The special handling of 64-bit numbers follows from the I-JSON
    recommendation to encode numbers exceeding the IEEE 754-2008
    double-precision range [IEEE754-2008] as strings; see Section 2.2 in
    [RFC7493].

Yet Appendix A. (".sid" file example) in draft-ietf-core-sid-19 shows 
these values encoded as JSON numbers.

For example:

     "assignment-range": [
       {
         "entry-point": 1700,
         "size": 100
       }
     ],
     "item": [
       {
         "namespace": "module",
         "identifier": "ietf-system",
         "sid": 1700
       },

should actually be:

     "assignment-range": [
       {
         "entry-point": "1700",
         "size": "100"
       }
     ],
     "item": [
       {
         "namespace": "module",
         "identifier": "ietf-system",
         "sid": "1700"
       },

I suspect the intention here is to use JSON numbers, not strings (the 
example encoded these values as such since version 00 of the draft back 
in 2016), but current text does not appear to support that interpretation.

2.) The text in Section 1 mentions that SIDs are expected to be assigned 
for data nodes defined with "yang-data" (RFC8040), but says nothing 
about nodes defined with "structure" (RFC8791):

    *  data nodes (Note: including those nodes defined by the 'yang-data'
       extension.)

3.) This (Section 4):

    The following YANG module defines the structure of this file,
    encoding is performed in JSON [RFC8259] using the rules defined in
    [RFC7951].  It references ietf-yang-types defined in [RFC6991] and
    ietf-restconf defined in [RFC8040].

should be:

    The following YANG module defines the structure of this file,
    encoding is performed in JSON [RFC8259] using the rules defined in
    [RFC7951].  It references ietf-yang-types defined in [RFC6991] and
    ietf-yang-structure-ext defined in [RFC8791].

The module does not reference ietf-restconf. There is a normative 
reference missing for [RFC8791] in Section 7.1 in addition to above.

4.) This (Section 4):

       description
         "A Wrapper container that together with the rc:yang-data
         extension marks the YANG data structures inside as not being
         intended to be implemented as part of a configuration
         datastore or as an operational state within the server.";

should be:

       description
         "A wrapper container that together with the sx:structure
         extension marks the YANG data structures inside as not being
         intended to be implemented as part of a configuration
         datastore or as an operational state within the server.";

A stale reference to "rc:yang-data" has been left in that description.

5.) Also (Section 4):

       description
         "YANG SID range(s) allocated to the YANG module identified
         by 'module-name' and 'module-revision'.

         - The YANG SID range first available value is entry-point
           and the last available value in the range is
           (entry-point + size - 1).
         - The YANG SID ranges specified by all assignment-rages
           MUST NOT overlap.";

should be:

       description
         "YANG SID range(s) allocated to the YANG module identified
         by 'module-name' and 'module-revision'.

         - The YANG SID range first available value is entry-point
           and the last available value in the range is
           (entry-point + size - 1).
         - The YANG SID ranges specified by all assignment-ranges
           MUST NOT overlap.";

There's a typo in the second list item ("assignment-rages" vs. 
"assignment-ranges").

Jernej