Re: [netmod] yang-data-ext issues

Andy Bierman <andy@yumaworks.com> Tue, 29 May 2018 19:21 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E8AA612F29F for <netmod@ietfa.amsl.com>; Tue, 29 May 2018 12:21:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.609
X-Spam-Level:
X-Spam-Status: No, score=-2.609 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 LYrAsCiCpM1n for <netmod@ietfa.amsl.com>; Tue, 29 May 2018 12:21:27 -0700 (PDT)
Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 742F812EE8D for <netmod@ietf.org>; Tue, 29 May 2018 12:21:26 -0700 (PDT)
Received: by mail-lf0-x234.google.com with SMTP id n18-v6so481729lfh.10 for <netmod@ietf.org>; Tue, 29 May 2018 12:21:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=XAMAFtRV++H6W9LdBCnEQ/DDFttrVjTMb3JClV3rJm0=; b=LDqhn6v6UoJ+WwSOqh0AS/RrPiKFrsevuK1iqwI0jXrtS88of0bnrpcGDVS4XJf+BN wKnCCE36GWcoU9PsPnHaBq66Rx0s8a4Uty0U9DIWy+7xM3k0bNhlB6VRmiTRrJOV6WU/ gw09UkhIBrESJB4hFiAiabt+dE6s/JaQfH/iesldscEFCBdSG2EtFMT6pGsmN7rlDrRK M4mQfEBtp3y190L0Z/9IFCrFekXkScJmvKCUMo1Q4c8Cocw8sl7DadImLAX0PneG0mj7 YtJddLYBALcqRKLYkmlzslcucrIBipMakjn60mKQyJO4nfOMYMXAGnDhRjTGPW5HxmMD P8RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XAMAFtRV++H6W9LdBCnEQ/DDFttrVjTMb3JClV3rJm0=; b=mkErvfi1HBUQD3bWyzDRLAgupvYjs9qDh0TRVOTs7Ul6s+qfPbC0F0LBmJOpt+sWb8 HMse+cB02WfTaAQSOu74UbHj/bL82pATC3k0zZ3rg2sq2W0XqqRlg8pAN6oa39EFgeGO T9f6AjRprsNwGhvtTtmC8zeYqfeMHtjVI/WDtwFiK/gHFwQSnGm+v1fUm7CpVyiAwQq6 ynm+rkk6Y2RAQjvsDipznxFafWiSjJKlOUKST6Or/TVmdeeK6hoDsiBPR4Y9N3lffu5T iE3WN026hNK/AhpK6rvPICsrAxmF0GwQuNIRY41UiTz88hb8iZgD8h3fHnMAqNwNhmiw Ujfw==
X-Gm-Message-State: ALKqPwc8svd4XzdhRypTarq0Fls9aqdp2rRn/K9RwgqeKCNMwVWqnpS0 spOp4v9kNx7/RDnOO92KWt4A+ifPrLKRO2UZSEpLGQ==
X-Google-Smtp-Source: ADUXVKLCkITEJ438jyNmT09gV5HwZxqpQpo2pLSUWPyJqiz4opdS+bitOMFJHLw0b5UYQpfwWF6lsCjERAoUt7M+NVw=
X-Received: by 2002:a2e:90d4:: with SMTP id o20-v6mr10160377ljg.15.1527621684535; Tue, 29 May 2018 12:21:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:d8c6:0:0:0:0:0 with HTTP; Tue, 29 May 2018 12:21:23 -0700 (PDT)
In-Reply-To: <20180529170900.qboedr2rmefsmblc@anna.jacobs.jacobs-university.de>
References: <CABCOCHSupojOLssLebB-mR_PybRLA_4bcbaNF6-8ZUrx1Pu53w@mail.gmail.com> <20180502.092527.2305319833268262996.mbj@tail-f.com> <9fca04b0-fb29-36b3-67aa-2f2c4fb98748@cisco.com> <20180502.112506.845305331945500257.mbj@tail-f.com> <20180502093626.ugsg6nq24a6vjtdn@elstar.local> <64990DFB-CF50-401A-A4EF-B6161C8D227B@juniper.net> <20180529170900.qboedr2rmefsmblc@anna.jacobs.jacobs-university.de>
From: Andy Bierman <andy@yumaworks.com>
Date: Tue, 29 May 2018 12:21:23 -0700
Message-ID: <CABCOCHQ4DJgGg4WQJRhqKAAjoX=DDPHNavTB5WQVVdzLmXJZRw@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Kent Watsen <kwatsen@juniper.net>, Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000dbb28a056d5d23d1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ZpCf6IIbr3ge6WV5AvGhet0jE8E>
Subject: Re: [netmod] yang-data-ext issues
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 29 May 2018 19:21:30 -0000

On Tue, May 29, 2018 at 10:09 AM, Juergen Schoenwaelder <
j.schoenwaelder@jacobs-university.de> wrote:

> On Tue, May 29, 2018 at 03:58:33PM +0000, Kent Watsen wrote:
> > [resurrecting this thread]
> >
> > Currently the zerotouch draft has a normative reference to this draft.
> > I will this week post an update to the zerotouch draft to resolve the
> > netconf list thread "a couple zerotouch-21 issues".   It would be easy
> > for me to also switch back to using rc:yang-data, but I won't do so if
> > this draft remains an active work-in-progress.
> >
> > Please see below for more.
> >
> >
> > On Wed, 2018-05-02 at 11:36 +0200, Juergen Schoenwaelder wrote:
> > >On Wed, May 02, 2018 at 11:25:06AM +0200, Martin Bjorklund wrote:
> > >>
> > >> The primary use case is not "generic RPC messages", but standalone
> > >> instance documents, error-info structures, etc.
> > >
> > > The proper solution for rpcs and actions is to define error
> > > information as part of the rpc/action. YANG 1.1 does not support
> > > this but this is where it should be fixed.
> >
> > Agreed, but note that the subscribed-notifications draft (both the
> > published -12 and unpublished -13) are relying on being able to do
> > just this, and YANG-next is years away...
>
> There is a description statement.
>


Automation tools generally use machine-readable statements, and avoid using
description-stmts.

The yang-data extensions do not solve this "rpc/action to error-info"
mapping
problem, so this problem is not a real factor here.



> > > Standalone instance documents (not tied to datastores) may have their
> > > use cases as well but it feels odd to create support for standalone
> > > instance documents as extensions and then to create even more
> > > extensions to support augmentation of these instance documents and
> > > whoever knows what comes next.
> >
> > What feels "odd" about this?  Is it not using the extension statement
> > as it was intended?
>
> For me, extensions that define new data definition statements are
> borderline. RFC 7950 has this nice statement:
>
>    o  extension: An extension attaches non-YANG semantics to statements.
>       The "extension" statement defines new statements to express these
>       semantics.
>
> This does not help since we lack a definition for 'non-YANG semantics'
> and yes I know that yang-data is today defined as an extension. But
> for me, this is a hack and instead of creating a slightly more
> generalized version of this hack, I prefer to stick to yang-data in
> favor of a proper solution as part of YANG.
>
>

The yang-data and augment-yang-data extensions do not re-define YANG data
nodes.
They define a new context for data nodes and prevent plain YANG tools from
confusing this new context with data for configuration or operational
datastores.



> > > For short-term needs, there is yang-data defined in RFC 8040.
> >
> > To be clear, the "short-term needs" are:
> >
> >   a) zerotouch: to define a standalone instance document
> >   b) notification-messages: to define a new notification message
> >   c) subscribed-notifications: to define error-info structures
> >
> > As I recall, this draft (not RFC 8040) is needed:
> >
> >   - for (a), because rc:yang-data doesn't support a top-level
> >     "choice" statement spanning "container" statements.
>
> So create a container.
>


I tend to agree that a top-level choice could be avoided.
This is not a really compelling use-case.



>
> >   - for (b), in order to augment a base yang-data "message"
> >     structure with additional nodes.
>
> So you are creating another augmentation mechanism. I am concerned
> about ending up with a zoo of different mechanisms if we go down this
> path, we may end up with every project or vendor creating their own
> variants.
>
> With NMDA in place, YANG 1.1 is decribing schemas for datastores plus
> operations and notifications. It is not a protocol message description
> language or a standalone file format description language. If this is
> needed, I prefer to create YANG X.Y - and if we manage the complexity
> we have something that is ideally integrated and consistent.
>



Yes it is a protocol message description language, but only
in an incomplete, hacky way.  Specific subtrees within protocol messages
are defined as special YANG data-defined portions and the rest is somehow
out of scope for YANG. The way nested roots (e.g., <config> or <data>)
are handled is the worst hack of all.  But IMO a new version of YANG is
needed
to really fix these problems.



> >   - AFAIAA, RFC 8040 is sufficient for (c)
> >
> > Has anything changed?   I don't think that we can un-adopt this
> > draft with said dependencies, right?
>
> I am just voicing my opinion. It may very well be that the WG prefers
> to go the route of not touching YANG 1.1 and instead patching around
> its limitations with extensions.
>
> My concern is simply driven that some want to patch in via extensions
> support for describing protocol messages and standalone documents,
> others want to patch via extensions and updates a different versioning
> system, and who knows what comes next. In the long run, I am afraid
> this will become a mess. And yes, it is always difficult to predict
> the future - we need crystal balls. Perhaps as an extension. ;-)
>

This is a separate (but important) topic -- YANG 1.1 + a vendor-selected
set of
optional extensions is not the same as a new version of YANG (with
mandatory-to-implement statements).

YANG designers cannot really rely on optional extensions across tool-chains.


>
> /js
>

Andy


>
> --
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>