Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 23 November 2018 11:33 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
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 BCAC5130E27 for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 03:33:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] 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 WO6O_pXp_IM4 for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 03:33:45 -0800 (PST)
Received: from atlas5.jacobs-university.de (atlas5.jacobs-university.de [212.201.44.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 562C6130E1E for <netmod@ietf.org>; Fri, 23 Nov 2018 03:33:45 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id DF82540; Fri, 23 Nov 2018 12:33:43 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from atlas5.jacobs-university.de ([10.70.0.217]) by localhost (demetrius5.jacobs-university.de [10.70.0.222]) (amavisd-new, port 10032) with ESMTP id tRDJi0ndzwpW; Fri, 23 Nov 2018 12:33:43 +0100 (CET)
Received: from hermes.jacobs-university.de (hermes.jacobs-university.de [212.201.44.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hermes.jacobs-university.de", Issuer "Jacobs University CA - G01" (verified OK)) by atlas5.jacobs-university.de (Postfix) with ESMTPS; Fri, 23 Nov 2018 12:33:43 +0100 (CET)
Received: from localhost (demetrius1.jacobs-university.de [212.201.44.46]) by hermes.jacobs-university.de (Postfix) with ESMTP id CA25620037; Fri, 23 Nov 2018 12:33:43 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius1.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id n-F08TEFCqy5; Fri, 23 Nov 2018 12:33:43 +0100 (CET)
Received: from exchange.jacobs-university.de (sxchmb04.jacobs.jacobs-university.de [10.70.0.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "exchange.jacobs-university.de", Issuer "DFN-Verein Global Issuing CA" (verified OK)) by hermes.jacobs-university.de (Postfix) with ESMTPS id 030CC2003C; Fri, 23 Nov 2018 12:33:42 +0100 (CET)
Received: from anna.localdomain (10.50.218.117) by sxchmb03.jacobs.jacobs-university.de (10.70.0.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1591.10; Fri, 23 Nov 2018 12:33:42 +0100
Received: by anna.localdomain (Postfix, from userid 501) id 382F8300449FAC; Fri, 23 Nov 2018 12:33:41 +0100 (CET)
Date: Fri, 23 Nov 2018 12:33:41 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Martin Bjorklund <mbj@tail-f.com>
CC: netmod@ietf.org
Message-ID: <20181123113341.br77pxmfhcwn6yck@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Martin Bjorklund <mbj@tail-f.com>, netmod@ietf.org
References: <20181122163046.bkzck2bmbrf3fzm7@anna.jacobs.jacobs-university.de> <87tvk85et8.fsf@nic.cz> <20181123093813.gpxrtanbxgadpwih@anna.jacobs.jacobs-university.de> <20181123.110548.845126088727972359.mbj@tail-f.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20181123.110548.845126088727972359.mbj@tail-f.com>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB02.jacobs.jacobs-university.de (10.70.0.121) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/euSJICnmwotk9a1osjocxX-zDzg>
Subject: Re: [netmod] Adding a pre-existing leaf into a new 'choice' - NBC change?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 23 Nov 2018 11:33:48 -0000

On Fri, Nov 23, 2018 at 11:05:48AM +0100, Martin Bjorklund wrote:
> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> > On Fri, Nov 23, 2018 at 10:22:11AM +0100, Ladislav Lhotka wrote:
> > > Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> writes:
> > > 
> > > > On Thu, Nov 22, 2018 at 03:00:27PM +0100, Martin Bjorklund wrote:
> > > >> Andy Bierman <andy@yumaworks.com> wrote:
> > > >> > 
> > > >> > 9.9 <https://tools.ietf.org/html/rfc7950#section-9.9>.  The leafref
> > > >> > Built-In Type
> > > >> > 
> > > >> >    The leafref built-in type is restricted to the value space of some
> > > >> >    leaf or leaf-list node in the schema tree and optionally further
> > > >> >    restricted by corresponding instance nodes in the data tree.  The
> > > >> >    "path" substatement (Section 9.9.2
> > > >> > <https://tools.ietf.org/html/rfc7950#section-9.9.2>) is used to
> > > >> > identify the referred
> > > >> >    leaf or leaf-list node in the schema tree.  The value space of the
> > > >> >    referring node is the value space of the referred node.
> > > >> 
> > > >> Yes, it should be "data tree" in both occurrences.
> > > >
> > > > Time for an errata?
> > > 
> > > Here is the old discussion thread:
> > > 
> > > https://www.ietf.org/mail-archive/web/netmod/current/msg15979.html
> > > 
> > > Everything relevant had been extensively discussed in it, and I am
> > > sceptical that we can come up with anything significantly better - it
> > > will only be more (or different) hand-waving. The problem is inherent in
> > > the leafref design introduced in YANG 1.1. It won't go away no matter
> > > how much we paper over it.
> > >
> > 
> > So you think the use of 'schema tree' in the text quoted above (is
> > used to identify the referred leaf or leaf-list node in the schema
> > tree) is correct??
> > 
> > I do not want to discuss whether you like the design of leafrefs or
> > not here - at this time we should focus on whether the text is correct
> > or not given the design we have. So again, you think that 'schema
> > tree' is correct in the statement?
> 
> After reading the quoted thread and thinking some more, I think the
> text in 9.9 is in fact correct.  As Lada wrote in that thread:
>  
>    2. It [path] also implicitly refers to a leaf node in the schema
>       [...]
> 
> The problem is that this "implicit reference" isn't defined.  9.9
> talks about reference to a schema node, and 9.9.2 talks about the data
> tree, but there is no text that ties these together.

Here is an attempt to rewrite things in a way according to how I
understand things works. It should be possible to describe what we
mean. If we can't do that, we have a bigger problem. (I have changed
only the last two sentences.)

OLD

   The leafref built-in type is restricted to the value space of some
   leaf or leaf-list node in the schema tree and optionally further
   restricted by corresponding instance nodes in the data tree.  The
   "path" substatement (Section 9.9.2) is used to identify the referred
   leaf or leaf-list node in the schema tree.  The value space of the
   referring node is the value space of the referred node.

NEW

   The leafref built-in type is restricted to the value space of some
   leaf or leaf-list node in the schema tree and optionally further
   restricted by corresponding instance nodes in the data tree.  The
   "path" substatement (Section 9.9.2) is used to identify a leaf or
   leaf-list node in the data tree. The value space of the leafref
   node is determined by the value space of the schema tree node
   definining the referenced data tree node.

This likely is not perfect yet but perhaps we manage to make it
perfect. ;-) What is not yet clearly described I think is what
'further restricted by corresponding instance nodes in the data tree'
means (and that I think depends on require-instance). Perhaps add
'(see Section 9.9.3)' to the end of the first sentence to handle this.

/js
   
-- 
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/>