Re: [yang-doctors] Modeling of protocol message structures

Ebben Aries <ebben.aries@nokia.com> Thu, 24 September 2020 23:28 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 2B7CF3A005C for <yang-doctors@ietfa.amsl.com>; Thu, 24 Sep 2020 16:28:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.595
X-Spam-Level:
X-Spam-Status: No, score=-3.595 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.695, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) 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 WPYIjF2T-hKU for <yang-doctors@ietfa.amsl.com>; Thu, 24 Sep 2020 16:28:14 -0700 (PDT)
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2094.outbound.protection.outlook.com [40.107.237.94]) (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 110113A0045 for <yang-doctors@ietf.org>; Thu, 24 Sep 2020 16:28:14 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+x6FlN73+XQiIbynk7fD8Sv8kUJVK2MIooBh+K3UGnhH6F+aDnIX/3xSRretDn7wW5ZVG9VT/z6JRaaUtJ/Pc94pE0nQ7KDWpKO8/w7rno4j5va8TKBLffWXGkrSqBm9K9fh2wSel7Py3/wseXA4X6S3mZ7cjO5tcE5brZ10er68etf5WLFvxv5FYsF1sT7SQv66wlJ4ozJv+s4SLayzGpDhhcSSklIJ+3j5yWf4nbwS1kgSI15+C4IDGixGs7POrv3UXDa7MbZkgJG5onYqVrQNuEhVLcy854saw/GrYQm467LL8uK5fA2o5e8S+a2E7Nv0r6GDhRBmneGlI6+tw==
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=bV8agMNoNyBSuySR3rUJV9uHNNysm6AUI1tT7eqMvOA=; b=UUjM3NugtZvnZwl8lwjKTkQqLUMW/gvfTZlJdvj1Bl8tbmvN2p20jCUl/8W1sstXo5iwpNWlg6bi04ZPu0zsuJ+2d+ap98+pWXUkqHSNZQ7Qe426AN3M2kJ5pjGsEGgLkNnn9D/nJ5fCLwAyi/v/aDs0FM0HCqLRmAC50ygenzAXYrGR8fCNy2OaLCmncLhl1BsLV/QgGhH+Gpp0djZx2pAt6NTCUwrOZR8QfhA6wzK2pOCjQ18Syume+xkJca7JEYAc77lpbz+masvmU6AikT2H+aHT8KdKS9fCsdPNj8/f7JB8nXVyzmghmcAzwB62H9sue+hhOmHjlN/rflQ0gg==
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=bV8agMNoNyBSuySR3rUJV9uHNNysm6AUI1tT7eqMvOA=; b=PV3uOCAPexHWD95U0oWqdyMlPoqGUz+ImBE2/Eaw03gb0V5JeTuosagXBgYRdwFIMVEyfk/1eIkzhhvzrYgQGYav7Insfl4/ohkVlUyK8ZHpMF82fnZ2ArhplaPdGBSAmnA6zu//roVHBTk5xAY5cJZ7eJTcn2UBW+3KlozUCZA=
Authentication-Results: yumaworks.com; dkim=none (message not signed) header.d=none;yumaworks.com; dmarc=none action=none header.from=nokia.com;
Received: from BN8PR08MB6258.namprd08.prod.outlook.com (2603:10b6:408:db::14) by BN6PR08MB2707.namprd08.prod.outlook.com (2603:10b6:404:c0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Thu, 24 Sep 2020 23:28:06 +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; Thu, 24 Sep 2020 23:28:06 +0000
Date: Thu, 24 Sep 2020 17:28:14 -0600
From: Ebben Aries <ebben.aries@nokia.com>
To: Andy Bierman <andy@yumaworks.com>
Cc: "Acee Lindem (acee)" <acee=40cisco.com@dmarc.ietf.org>, YANG Doctors <yang-doctors@ietf.org>
Message-ID: <20200924232814.GB16594@localhost>
References: <20200924185441.GA11798@localhost> <674AE5F9-72B6-41B5-A5FF-3904A0C59BE1@cisco.com> <CABCOCHTX1uEC7KGeSYdqN764tcv-uGpjoPqQtUgDgj1FkQHVRg@mail.gmail.com> <20200924200627.GA16594@localhost> <CABCOCHRb3pmxAuU+EuenwXb_7zjeynCz4_ki_H0nKk2zQOa5bQ@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABCOCHRb3pmxAuU+EuenwXb_7zjeynCz4_ki_H0nKk2zQOa5bQ@mail.gmail.com>
X-Originating-IP: [131.228.48.74]
X-ClientProxiedBy: CH2PR20CA0019.namprd20.prod.outlook.com (2603:10b6:610:58::29) 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 CH2PR20CA0019.namprd20.prod.outlook.com (2603:10b6:610:58::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22 via Frontend Transport; Thu, 24 Sep 2020 23:28:05 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-HT: Tenant
X-MS-Office365-Filtering-Correlation-Id: d30a0ed0-1825-403a-6880-08d860e17d3a
X-MS-TrafficTypeDiagnostic: BN6PR08MB2707:
X-Microsoft-Antispam-PRVS: <BN6PR08MB2707AFEF99AD40C30ED7E2E2FB390@BN6PR08MB2707.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: Y1pFb9v9Zxklxj1LPK0IoTs14UqtmbCjyjtyM8xrPUMiL4lxL8klSasIMd+UYxTnsXveqVeGvGJj8G1sv+pd4oiDpdqXHxkthvLIz8Mxb8T9OhmLb0usQnvYl99GbCXRHr98kE8gJmX71O2DmxZjqL0mFBoaOWrxPIVUz3cID5kacoua4gLt+iNczKhHVBURtnOclnsobiNaQBMp6iR/TFLgTrejiQOrw12nfct5iWCfcqHg3g1AinA/TzcwOsYJURVa/fMkQz2djeNFP4C+aTGmLcVQ3aVWi1Xno/uFeuyoPNW8+xxp9K3uhTqCe7KUNG6u+w870IGJVVIOerBaliCMNGfnbv/B4rPtbfNr19wIYKF+54QzYpk3YHu1h+64tTy1x/M6lyIVnLjED2T7kppVG2dGmCdQ2L0yEs6/4fmIQUSqBXYwGj6NCln6L8tJIb22sNG2koanu2zolqNSlw==
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)(366004)(136003)(39860400002)(376002)(396003)(346002)(44832011)(2906002)(6916009)(5660300002)(9686003)(33656002)(54906003)(966005)(55016002)(15650500001)(8676002)(4326008)(83380400001)(66946007)(1076003)(478600001)(956004)(16526019)(8936002)(316002)(86362001)(186003)(26005)(33716001)(52116002)(6666004)(66476007)(9576002)(66556008)(53546011)(6496006); DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: DJrxyXttDYJwah1/F93BXjpV2l1SBEQ5SBM5nYBxgY1/OCbZG94Eoy6wtVD5GEhswDQI/G4MI2I7lvzZV6gpKs/3rYsjwAohGLqeyTZ8BEdM5pLzx05XyON53a0oVZtZ6FtxlbmHu0CxlKFsbXS6Bz+TLEwa64dC3/xCIYX2lMBN3cSNjRtNb1pQu7NxkBYO7Ve0Q/Qm3DS+1C2QbTDS+pObVwizy53N4vDDUvE/jp51JFvvYzeXURzQD0h4+leYqQmnMlgDjmNLPasjaMtnVwOxxSW+PnZjNtYRplNUKCBNSHfPy+2SOon41DezSMVv65kXIYVyzp5RX9KSlhX37EXlUEe0QLWMnH9dEHNmSZv3D7pT6UbzwDyxr+LywQrceuBj6CHLpVh7x7PiFVAFrYFFqL7oLVGG6ebrLsAe8chX/LHz0vZoPuDZA9M01FaQiDIobPfhKpif3j0AXrQRJ550cjW2kt+LUD+UAwYJLrYIRUO1oM20yN8XDaOcaF5+2UNtrX3X2SRV6OpjGTyvfsPRqkDQFAfArk4jpQ9X+h1Yw4xXn2SU/dd5ib6WhOQMsOqMsOtSKUYmH2WDy/JjjHulcaf7rPPr9WfJQ98l/5N2rQ0MjdYgqIxh9GmzT6AYBg0PgBpl/xdsybUzqmb6qA==
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d30a0ed0-1825-403a-6880-08d860e17d3a
X-MS-Exchange-CrossTenant-AuthSource: BN8PR08MB6258.namprd08.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2020 23:28:06.2582 (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: pxccoKFEaq+l+JgUsgVPSXkXDmzNl2GwoAf4yZCwaqd+YkfPLvOE84HclOI+9oVZRZZKmS1khfSQMCcB8FEQ+w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR08MB2707
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/NABSfL-pdAYGE6Tb4-LE6ORiX9c>
Subject: Re: [yang-doctors] Modeling of protocol message structures
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: Thu, 24 Sep 2020 23:28:16 -0000

On Sep 24 13:14 PM, Andy Bierman wrote:
> 
> 
> On Thu, Sep 24, 2020 at 1:06 PM Ebben Aries <ebben.aries@nokia.com> wrote:
> 
>     On Sep 24 12:45 PM, Andy Bierman wrote:
>     >
>     >
>     > On Thu, Sep 24, 2020 at 12:16 PM Acee Lindem (acee) <acee=
>     > 40cisco.com@dmarc.ietf.org> wrote:
>     >
>     >     Hi Ebben, Esteemed Doctors,
>     >     It would be good to understand the reasons for using YANG as a
>     message
>     >     schema language and how it relates to the tooling and bits on the
>     wire.
>     >     Note that I didn't read the document other than looking at the YANG
>     model
>     >     so perhaps these questions are addressed.
>     >
>     >
>     >
>     > We have been using YANG to drive protocol message automation for years.
>     > Since the tools already support YANG for NETCONF this is not hard to add.
>     >
>     > The main reasons:
>     >    - want a formal definition of the message exchanges
>     >    - want to annotate the model with tool-specific extensions to automate
>     lots
>     > of corner-cases
>     >    - want an encoding-neutral message definition
>     >    - want to utilize existing support to send/receive YANG data in
>     different
>     > encodings
>     >        - lots of XML now but we already cover all data with JSON and soon
>     CBOR
>     >    - using augment it is easy to define message payloads in layers
>     >
>
>     Yes and all great reasons however my questions/comments are more
>     specific as to the publication of protocol message structures in IETF
>     documents as published IETF and IANA YANG models.
>
>     This document is the first I've seen attempting to do such.
>
>
>
> Look at RESTCONF (RFC 8040). It uses YANG to define some protocol message
> components.
> Anima WG is also using YANG to define structures (not for use with NETCONF or
> RESTCONF).
>

ack yep - so we have a few cases of rc:yang-data and sx:structure out
there not related to NC/RC

So in general - nothing wrong w/ this approach and left up to authors
atm but we could start to see message structures come at time of
protocol definition in one module while config/state (+
rpc/notification/action) for datastores come later on either questioning
the combination into the already published module set or trying best to
ensure module name/prefix/namespaces are correctly reflected towards the
intent of these modules

Simple example:
- 'ietf-bgp' is published defining message structures for the base wire
  protocol
- Later date we now look to publish config/state modules for BGP but now
  need to either look to combine into the same module or come up w/ some
  inconsistent naming for this new module set

>
>
>     And are we going to go back through other protocols to date and develop
>     message structure modules for those?
>
>
>
> that seems like a separate issue, but nobody is suggesting that existing
> protocols need to be rewritten to use YANG to define messages.
>
> If somebody wants to use YANG for this purpose then RFC 8791 can be used.
> It should be up to the WG I guess.
>

Agreed and short of going back over existing protocols, is this
something the IETF is looking to promote/enforce going forward?  If not
then I question why for some and not others.

Not to mention likely the need for community based tooling for
consistent code generation from our new source of truth YANG.

>
>
>
>     Before I raise the question of intent as to why back towards the
>     document author, I wanted to understand if anyone else has been seeing
>     this approach in IETF documents yet (or if it is being
>     promoted/mandated)
> 
>     >
>     >
>     >     Thanks,
>     >     Acee
>     >
> 
> 
> 
> Andy
>  
> 
>     >
>     >
>     > Andy
>     > 
>     >
>     >
>     >     On 9/24/20, 2:55 PM, "yang-doctors on behalf of Ebben Aries" <
>     >     yang-doctors-bounces@ietf.org on behalf of ebben.aries@nokia.com>
>     wrote:
>     >
>     >         I wanted to solicit feedback/opinions from a recent review (that
>     at
>     >         least 1 other of you have had the chance to review) - The draft
>     in
>     >         question is draft-ietf-dots-rfc8782-bis-00
>     >
>     >         Now, this is the first I've seen to make its way through YD
>     review (and
>     >         maybe there are others) but the above is an example of modeling
>     the
>     >         message structure payload for the DOTS signaling channel over
>     CoAP.
>     >         There is no relationship to NETCONF/RESTCONF and/or datastores
>     but
>     >         rather just definitions of pure message structures as best as can
>     be
>     >         described in the YANG language (with implementation details left
>     to the
>     >         specficiation).
>     >
>     >         For the most part, I think this is fine and a possible use being
>     code
>     >         generation but still need to factor in statements that will not
>     >         translate directly to underlying language semantics and/or rules
>     and
>     >         restrictions that sit outside of the data-model (and only in the
>     >         specification or description stmt) - Is the use being force fit
>     for
>     >     this
>     >         type of case?
>     >
>     >         My questions/comments to everyone:
>     >
>     >         - Are we starting to see this as the norm for newer protocol
>     >           specifications in general and is there any rule around such or
>     is it
>     >           up to each author if they want to model any message structures
>     or not
>     >           in the YANG language and publish a module?
>     >
>     >         - Is the above necessary?  Does this provide much if any
>     advantage to
>     >           doing so in comparison to the maintenance, publication and
>     potential
>     >           for confusion?
>     >
>     >         - We now have the potential for publication of a large amount of
>     YANG
>     >           models that may or may not apply to the regular use to date. 
>     You
>     >           cannot tell the difference or purpose of these modules by
>     purely
>     >           looking at any identifier in the module name or header today.
>     >
>     >         - To the above point, modules will be published that could very
>     well
>     >           conflict with proper names of future modules that are centered
>     around
>     >           datastore interaction for that same domain.
>     >
>     >         - (Specific to the review and not structures themselves) - Some
>     modules
>     >           related to above have been published and am assuming these did
>     not go
>     >           through YD review.  We now have very generic prefixes published
>     such
>     >           as 'data-channel'.  While of local significance, we should be
>     more
>     >           descriptive and unique across IETF or IANA published modules.
>     >
>     >         Thx
>     >
>     >         /ebben
>     >
>     >         _______________________________________________
>     >         yang-doctors mailing list
>     >         yang-doctors@ietf.org
>     >         https://www.ietf.org/mailman/listinfo/yang-doctors
>     >
>     >     _______________________________________________
>     >     yang-doctors mailing list
>     >     yang-doctors@ietf.org
>     >     https://www.ietf.org/mailman/listinfo/yang-doctors
>     >
>