Re: [netmod] yang-data-ext issues

Martin Bjorklund <mbj@tail-f.com> Mon, 23 April 2018 20:08 UTC

Return-Path: <mbj@tail-f.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 918F712D810 for <netmod@ietfa.amsl.com>; Mon, 23 Apr 2018 13:08:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 jioAVy6qBdVx for <netmod@ietfa.amsl.com>; Mon, 23 Apr 2018 13:08:17 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id D226512D945 for <netmod@ietf.org>; Mon, 23 Apr 2018 13:08:16 -0700 (PDT)
Received: from localhost (h-80-27.A165.priv.bahnhof.se [212.85.80.27]) by mail.tail-f.com (Postfix) with ESMTPSA id 2078C1AE018C; Mon, 23 Apr 2018 22:08:16 +0200 (CEST)
Date: Mon, 23 Apr 2018 22:08:15 +0200
Message-Id: <20180423.220815.526647366558506966.mbj@tail-f.com>
To: andy@yumaworks.com
Cc: kwatsen@juniper.net, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <CABCOCHTwdBbo_qtBu=_OunOtLNBXmWCWVZ8ajr0LFZPDFpNEFg@mail.gmail.com>
References: <CABCOCHQXqPpXT031qaZ5psPr4C8rsC6E2PkaL2nNLB7K-H_37g@mail.gmail.com> <20180423.214923.1209533731960312602.mbj@tail-f.com> <CABCOCHTwdBbo_qtBu=_OunOtLNBXmWCWVZ8ajr0LFZPDFpNEFg@mail.gmail.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/20IIw2WC2zJBf23o6o6uHdHZvm8>
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: Mon, 23 Apr 2018 20:08:18 -0000

Andy Bierman <andy@yumaworks.com> wrote:
> > ....
> > >
> > > I do not understand the need for a yang-data structure that represents
> > data
> > > that can be instantiated anywhere and everywhere.
> >
> > AFAIK noone is proposing that.
> >
> > > I do not want to break
> > > existing tools that expect sibling data nodes in the same module
> > namespace
> > > to
> > > be unique local-names.
> > >
> > > I would rather stick with the yang-data in RFC 8040 than introduce a new
> > > extension
> > > with no restrictions.  Standard YANG extensions should be interoperable
> > and
> > > have
> > > a clear purpose.
> >
> > Of course.
> >
> > > If we do not need to define what a YANG extension does in
> > > a way that can be observed somehow, then it does not need to be a
> > standard.
> >
> > Agreed.
> >
> > Not sure how any of this helps with the original issue though.
> >
> >
> 
> You proposed that duplicate nodes were OK:
> 
> module X {
> prefix x;
> 
> x:yang-data A {
>    list foo { ... }
> }
> 
> x:yang-data B {
>   container foo { ... }
> }
> 
> }
> 
> 
> I do not want to allow any duplicates.

Yes, I got that.

> There are no encoding and parsing rules for instance data
> that support this sort of duplicate.

This is not correct, as I have demonstrated earlier, and I think you
also accepted; if different structures are defined for different rpcs'
error-infos, then these structures can have the same child node names.

I think that we have to agree on the basics before disussing
solutions:

  1)  Should we do anything at all?

      (i.e., keep using yang-data in RFC 8040)

  2)  Should we define structures that only can be used in
      standalone instance documents?

      (i.e., *more* restrictive than yang-data in RFC 8040)

  3)  Should we define structures that can be used in standalone
      instance documents, error-info contents, and other places that
      we might not know right now?

      (i.e., *less* restrictive than yang-data in RFC 8040)


Since the current draft says:

   The "yang-data" extension statement from RFC
   8040 [RFC8040] is defined for this purpose, however it is limited in
   its functionality.

   The intended use of the "yang-data" extension is to model all or part
   of a protocol message, such as the "errors" definition in ietf-
   restconf.yang [RFC8040], or the contents of a file.  However,
   protocols are often layered such that the header or payload portions
   of the message can be extended by external documents.  The YANG
   statements that model a protocol need to support this extensibility
   that is already found in that protocol.


I thought we are doing (3).



/martin



> yang-data definitions define conceptual data nodes (e.g, /x:foo)
> Only one data-def-stmt (in yang-data or otherwise) can define a data node
> /x:foo.
> The descriptive names for the yang-data (A or B) do not define namespaces.
> 
> 
> 
> > /martin
> >
> >
> Andy