Re: [yang-doctors] Yangdoctors early review of draft-ietf-dots-rfc8782-bis-00

Ebben Aries <ebben.aries@nokia.com> Fri, 25 September 2020 00:52 UTC

Return-Path: <ebben.aries@nokia.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E414A3A048D; Thu, 24 Sep 2020 17:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.7
X-Spam-Level:
X-Spam-Status: No, score=-1.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=nokia.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 0_rKVPT432he; Thu, 24 Sep 2020 17:52:55 -0700 (PDT)
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2104.outbound.protection.outlook.com [40.107.220.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D3D5D3A03F5; Thu, 24 Sep 2020 17:52:54 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XYOqhV1V6Q+smBywJrd45RlSpWrEw+eoWZcl0WyMuWpKIRlcKPD/GiYXUrfGKdyGQ8Pc4zNazlT1kxaVkyADQ6GDrcSVgxvXKUE2vGyXAPT+gbdi7SSTzVxlKChnr1/EBCBramCKkUI0xB/vO5UJ+ALMuGUsyvHi57zog1RXpv5hso3QDuVDHpYUJ1BLWuHex0A3t3SEPI4VZ62Hcp5zaeCliM962HdoSzDR+Z8Q7CgEFN7KGkIsMRMWdvobmN3CWzjzX/3sQ2zQtJIfgC92GB3F3n4WDAxnHHBdhS2SVBwoBmOPnRCH1ZpKxiZNr66T172Tag5fyXFd+ry2ERLfMA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zTkUQXHL5R7N2EqFV5qT1Y0fLjZfzbMHG0Y8PgrtQmM=; b=Doj+sygnI51eJ6L7FqsLWyXJOuG9RC3cKSFjIfV8gIOWsyEcXo5DWa9Qchfuy3IXPlGNLx5Al3bTuZpwJuBW0Lk86ZhHLsiGb2O8tadJgCgLv0eZ6tjD9H6iZguITeIFuQ55FElDaXTWyVUGziJFxPtDo/9184DF7Cjt1XWDBG8WHWYVtvmOA+UaaYiUlXPK5wzx3TujgT6GvsJsT+MMOZlwpYQ5iyHPiUhpf5Cy0FudM01/P/wMHLExJZ3/ecNFMfh05wpIcMLKrMPgjMzQaqCFJf2llBhAKVTBhwbXEWsGjlfRK7ktuk2ZiKpsB3kFOc10SJ8xI44MdT0ycj1nQw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zTkUQXHL5R7N2EqFV5qT1Y0fLjZfzbMHG0Y8PgrtQmM=; b=u98CK19LBBO4WzPQyLEjXt2Qe5HXF+QAPsL0Gi+6zD/zRmrC5h8AfuravzMeCOYLCKsY/3UcESVnaGZCghYoI2UA4aF2sESSzofo326SDGws4A6QWEbQmAtEoOwJ8D2vGbSe8XjSgHwSKfZ/PG2asxT3N5wPlq2QiHMdGEm1NTs=
Authentication-Results: orange.com; dkim=none (message not signed) header.d=none;orange.com; dmarc=none action=none header.from=nokia.com;
Received: from BN8PR08MB6258.namprd08.prod.outlook.com (2603:10b6:408:db::14) by BN8PR08MB6260.namprd08.prod.outlook.com (2603:10b6:408:da::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.19; Fri, 25 Sep 2020 00:52:52 +0000
Received: from BN8PR08MB6258.namprd08.prod.outlook.com ([fe80::292e:c8f:4e0b:a202]) by BN8PR08MB6258.namprd08.prod.outlook.com ([fe80::292e:c8f:4e0b:a202%9]) with mapi id 15.20.3412.022; Fri, 25 Sep 2020 00:52:52 +0000
Date: Thu, 24 Sep 2020 18:53:00 -0600
From: Ebben Aries <ebben.aries@nokia.com>
To: mohamed.boucadair@orange.com
Cc: "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "dots@ietf.org" <dots@ietf.org>, "draft-ietf-dots-rfc8782-bis.all@ietf.org" <draft-ietf-dots-rfc8782-bis.all@ietf.org>
Message-ID: <20200925005300.GA2034@localhost>
References: <160091148495.1709.10744527350560713534@ietfa.amsl.com> <18277_1600936569_5F6C5A79_18277_298_1_787AE7BB302AE849A7480A190F8B9330315459EC@OPEXCAUBMA2.corporate.adroot.infra.ftgroup>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <18277_1600936569_5F6C5A79_18277_298_1_787AE7BB302AE849A7480A190F8B9330315459EC@OPEXCAUBMA2.corporate.adroot.infra.ftgroup>
X-Originating-IP: [131.228.48.74]
X-ClientProxiedBy: CH2PR20CA0004.namprd20.prod.outlook.com (2603:10b6:610:58::14) To BN8PR08MB6258.namprd08.prod.outlook.com (2603:10b6:408:db::14)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
Received: from localhost (131.228.48.74) by CH2PR20CA0004.namprd20.prod.outlook.com (2603:10b6:610:58::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Fri, 25 Sep 2020 00:52:51 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: d00fe59d-5e6f-482b-b142-08d860ed54ce
X-MS-TrafficTypeDiagnostic: BN8PR08MB6260:
X-Microsoft-Antispam-PRVS: <BN8PR08MB6260D66482FF7B913A8BE8AFFB360@BN8PR08MB6260.namprd08.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: QGV9YI32ffGJwvkH7FQZrAJrsW6As6SmM9vckC77oqZAiJr8yg4+NXulwj2CLhuwCLszA+RxUQQDaUrAeXmwAbbWK4rz/NhWoNp8UMpPqguws159mVsUKEWg3ewCHBRARdiiGTHjk+6W4IOLyonLiPt49Y88N/eV1h5XScGQQP1OSa2rHeQhwlcNJFqtAObTawrjW1WP1ClbujPgVbPQBPynebkK3/i2sYd0theEl6/pryCsSb+jxRx9RSiq22xSE5tnd9HOhD4Yylc1ghzxq2QpUUYxfOMmUXn07YzLr3Jj0HzMG0eUqalnh6orrNBSqKAHsFBY89Mp2fB7D0Y3I1aYn4tPd4rMOWjW8cm1N3Wg8bK7RARgl0mX9kaaxjzd
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR08MB6258.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(366004)(136003)(346002)(9576002)(33716001)(5660300002)(44832011)(1076003)(6496006)(956004)(66946007)(316002)(9686003)(66476007)(6666004)(66556008)(33656002)(55016002)(52116002)(83380400001)(16526019)(186003)(478600001)(4326008)(8936002)(54906003)(8676002)(2906002)(26005)(6916009)(86362001); DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: 0by5nxKUl23Wqusw8o8I2Yg71onzBQa72cEW5Q/yWBM5Pstf+z3m9OtUAnYHnI0cmysgmc0ekCrlPPggNS0tP9CVb7XxrXyroPj9Q8yinAVUHofwHk5po21Fen6HQ92VL7TuEvJVVyS9nsy2dJ2yaehPfKAVtkZkVBp5gWJRR+AMjkYDiEwALhW94nw3gnHiWatJ6bD0zHubZMefaeNlp//JtDwJ6OXtWEuUWzvUCTNjFsthQOW6LBrmr4UgboT89HCGX2h9h/zdYI4h9+LNWYpSNhLB8CobhRKBMUl/7aV+YdmfogCTqcnONpF7VyAiO5fv3Ju2ahiHYcDO3XG1JoDENQrXNqqnDeT8DjWW2QMX/mkuI4I9pHKFDM+FZDbb8HMtTHP+EzZz3MtgP9dEHd5NyhKkW0IuzLgo7nrOvWUx7spJl+HlA3JzXvXyjbHHqkRDueJOwbpSt6fJQ/Pn1xlGGrQQud3ZK2ZEC2CP8JliTEcC0BdEH3Kh/K67efjkaYvb/KGhigVBZ0SwfXkp8Iy74bnsm+UA4xUPy+MA1Z1wPM1kUQXyl0QbNO+GlynUknmp5xmdCJvaR1ZYw2cbFACh9EC+WVXiEwHW/JjtbUJ6Z1h1QdczmGMYA3NCs5G3/UzmHwp0TJre2ut+6auG3Q==
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d00fe59d-5e6f-482b-b142-08d860ed54ce
X-MS-Exchange-CrossTenant-AuthSource: BN8PR08MB6258.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2020 00:52:52.2847 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: /CJg7f+eWSuFVNAR7o9MjyJXO8e9EvJmKxZ0sKEiua8lXy9f2fNgpbRcT/L4WS/Jk/hx6cVlL8WhJo0ing2LBw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR08MB6260
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/fOse2QQfzZ1nt5YHqLbQa5hq0L0>
Subject: Re: [yang-doctors] Yangdoctors early review of draft-ietf-dots-rfc8782-bis-00
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Sep 2020 00:52:57 -0000

On Sep 24 08:36 AM, mohamed.boucadair@orange.com wrote:
> Hi Ebben, all,
> 
> Thank you for the review. 
> 
> Please see inline. 
> 
> Cheers,
> Med
> 
> > -----Message d'origine-----
> > De : Ebben Aries via Datatracker [mailto:noreply@ietf.org]
> > Envoyé : jeudi 24 septembre 2020 03:38
> > À : yang-doctors@ietf.org
> > Cc : dots@ietf.org; draft-ietf-dots-rfc8782-bis.all@ietf.org
> > Objet : Yangdoctors early review of draft-ietf-dots-rfc8782-bis-00
> > 
> > Reviewer: Ebben Aries
> > Review result: On the Right Track
> > 
> > 2 modules in this draft:
> > - ietf-dots-signal-channel@2020-07-02.yang
> > - iana-dots-signal-channel@2020-05-28.yang
> > 
> > YANG compiler errors or warnings (pyang 2.3.2, yanglint 1.9.2)
> > - No compiler errors or warnings however pyang 2.3.2 is currently
> > the only
> >   compiler verified to emit YANG sx:structure data in tree format.
> > Instance
> 
> [Med] I confirm this is what we are using. 
> 
> >   data could not yet easily be validated given the current
> > linters/compilers.
> > 
> > General comments on the draft/modules:
> > ----------------------------------------
> > The modules defined in this draft are an update replacement to those
> > defined in RFC8782 with only 1 being updated from the prior
> > publication.
> >   - ietf-dots-signal-channel@2020-05-28.yang (updated)
> >   - iana-dots-signal-channel@2020-05-28.yang
> > 
> > - First, I share some of the same comments as the previous review in
> > that it
> >   takes some additional thought on modeling structures for alternate
> > protocol
> >   communications with the YANG language.  Overall, I think this is
> > likely fine
> >   but also question where the draft/RFC specification outlines rules
> > that are
> >   not conveyed within the data-model.  Some examples include
> > specifying
> >   mandatory attributes but not making use of the YANG 'mandatory'
> > statement.
> 
> [Med] We are using "mandatory" statements when this makes sense (e.g.,
> alt-server, hb-status). It is not used for some attributes that may
> appear in both directions, but are not mandatory in one direction. For
> example, "lifetime" is mandatory in a mitigation request, but it is
> when the server replies with a conflict message. 
> 
> FWIW, a constraint we had is to reuse as much as possible the same
> CBOR key/attribute names. This is not possible if we overload the
> module with "choice"s:
> 
> ==
>    Each "case" may
>    contain multiple nodes, but each node may appear in only one "case"
>    under a "choice".
> ==
>
> This is why what is normative for an implementation is the core of the
> specification not the YANG module itself.
>

Ack - however just like other verbiage put within the YANG description
statements to indicate valid/invalid values (some of which is a direct
copy from the document detail), I might expect at a bare minimum the
description for the node carry when a node is mandatory within the
payload or not if it cannot be expressed via a language statement as you
indicate - e.g. This node is mandatory for request and info retrieval
operations.

Also keep in mind, YD reviews likely have not dealt with many such cases
yet so a best practice for these types of use-cases does not necessarily
exist yet.

> >   Other cases are stating the intent of reserved or invalid integers
> > but not
> >   putting the same restrictions on the types under a given data
> > node. 
> 
> [Med] Can you please indicate which data node are you referring to? Thanks.
>

A common example to point out...

An unbounded int32 with the description yielding the rules around valid
values.  From a pure type perspective, all values that fall within the
int32 range are valid and data validation is only then left to the
running implementation and conveying invalid boundaries by way of
protocol error messaging.

105       leaf lifetime {
106         type int32;
107         units "seconds";
108         default "3600";
109         description
110           "Indicates the lifetime of the mitigation request.
111
112            A lifetime of '0' in a mitigation request is an
113            invalid value.
114
115            A lifetime of negative one (-1) indicates indefinite
116            lifetime for the mitigation request.";
117       }

Now to be fair, this also exists in datastore related modules where the
instance data can be valid from a data-model conformance standpoint but
still not meet the requirements of the implementation - all such cases
make it harder for the model consumer to fully validate instance data
outside of the complete implementation.

The tradeoff of leaving this outside the schema is likely fine here.

>  Overall
> >   this means that you cannot validate the instance/payload data
> > according to
> >   the data-model alone.
> 
> [Med] Agree. The data model alone is not sufficient for an
> implementer, it should rely on the detailed spec. 
> 
> > 
> > - Previous review suggested the main edits required switching the
> > top-level
> >   container 'dots-signal'.  This has now been fulfilled by that of
> > an
> >   sx:structure in this revision.
> > 
> 
> [Med] Thanks. 
> 
> > - A recent discussion among YANG doctors suggests the use of
> > normative
> >   language (RFC2119) in YANG description statements. For example
> > 'should' =>
> >   'SHOULD', 'must' => 'MUST', etc... A benefit to this approach is
> > RFC
> >   comprehension even when the module is stripped from the source
> > document it
> >   is contained under.
> 
> [Med] Thank you for sharing this. I understand the benefit for the
> "classic" use of YANG, but in our case I'm afraid thus this will be
> redundant with the core specification itself.
>

YANG modules can become detached from the IETF document containing them
(and is the intention for the normal uses as you mention) and for this
purpose, the module should be as descriptive as possible to live on its
own.

Now for this use, you are defining solely message structures which can
likely still be used for library code generation on its own without
further context.  The implementation however will need to take into
account the specification to build upon and this is fine.

And yes, for all other cases I mention the intention is to be redundant
carrying the verbiage from the specification detail into the YANG
description statements for consistency - especially here where a
protocol specification will already carry this in the detail.

> > 
> > - (draft) L887 nit: "As a reminder, the prefix length must be less
> > than or
> >   equal to 32 (for IPv4) for 128 (for IPv6)"
> 
> [Med] Fixed. Changed to:
> 
> "As a reminder, the prefix length must be less than or equal to 32 for IPv4 and 128 for IPv6."
> 
> > 
> > Module ietf-dots-signal-channel:
> > ----------------------------------------
> > - IMO, the module prefix 'signal' is too generic for what is
> > specific to
> >   message payload over a protocol that uses CoAP.  Looking at all
> > the
> >   published RFCs for dots, we have the same use of generic prefixes.
> > Since
> >   the prefix is of local scope, it is not an entirely large issue
> > but in
> >   hindsight should have had some better consistency especially when
> > the
> >   recommendation to module importers is to utilize the defined
> > prefix of said
> >   module.
> 
> [Med] Fair enough. Changed to "ietf-dots-signal".
> 
> > 
> > - This module imports and references 'ietf-dots-data-channel' as
> > prefix
> >   'ietf-data'.  Not only is this too generic as I mentioned above,
> > it is not
> >   using the suggested prefix of 'data-channel' (which is also too
> > generic) as
> >   defined within that module (RFC7950 Section 7.1.4)
> > 
> >    "When used inside the "module" statement, the "prefix" statement
> >     defines the prefix suggested to be used when this module is
> > imported."
> 
> [Med] Fixed. Updated to use 'data-channel'.
>
> > 
> > - Minor nit: It appears all author email addresses have been updated
> > since the
> >   RFC8782 variant replacing '@' with '&'
> 
> [Med] Fixed. 
> 
> > 
> > Module iana-dots-signal-channel:
> > ----------------------------------------
> > - Similar to what I mention above regarding the module prefix, we
> > use a
> >   generic 'iana-signal' prefix here which is inconsistent and not
> > descriptive
> >   of the overall intent of the module.
> 
> [Med] Updated to "iana-signal-channel".
> 
> > 
> > Overall, I'm not sure if the other referenced and published DOTS
> > YANG modules went through a YD review but the comments above really
> > should be addressed in a new revision of those modules.
> 
> [Med] Sure. We will double check those. 
> 
>   Once the
> > above is addressed and possibly some discussion around when type
> > restrictions are not conveyed within the model, it is probably on
> > the right track. 
> 
> [Med] Great, thanks. We can add some clarification as needed, but as
> indicated above, if you can share the attributes you are referring to,
> this will be helpful. Thanks.  
> 
>  Since this is not the usual use of YANG in the
> > context of YD reviews, it is a bit of an on the fly analysis which
> > may require some additional discussion among other YANG doctors.
> > 
> 
> [Med] Sure.
> 
> 
> _________________________________________________________________________________________________________________________
> 
> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
> 
> This message and its attachments may contain confidential or privileged information that may be protected by law;
> they should not be distributed, used or copied without authorisation.
> If you have received this email in error, please notify the sender and delete this message and its attachments.
> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
> Thank you.
>