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

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Fri, 23 November 2018 15:59 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 4967F130E34 for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 07:59:28 -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 HpRsYPfDBYNp for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 07:59:26 -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 22A94130DFF for <netmod@ietf.org>; Fri, 23 Nov 2018 07:59:26 -0800 (PST)
Received: from localhost (demetrius5.irc-it.jacobs-university.de [10.70.0.222]) by atlas5.jacobs-university.de (Postfix) with ESMTP id AFDAFCFF; Fri, 23 Nov 2018 16:59:24 +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 YjGCShWUSX5O; Fri, 23 Nov 2018 16:59:24 +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 16:59:24 +0100 (CET)
Received: from localhost (demetrius4.jacobs-university.de [212.201.44.49]) by hermes.jacobs-university.de (Postfix) with ESMTP id 9A9EB2003D; Fri, 23 Nov 2018 16:59:24 +0100 (CET)
X-Virus-Scanned: amavisd-new at jacobs-university.de
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius4.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id VZmnOaXRrwJp; Fri, 23 Nov 2018 16:59:24 +0100 (CET)
Received: from exchange.jacobs-university.de (SXCHMB02.jacobs.jacobs-university.de [10.70.0.121]) (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 0898120037; Fri, 23 Nov 2018 16:59:24 +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 16:59:23 +0100
Received: by anna.localdomain (Postfix, from userid 501) id 639F630044AA5A; Fri, 23 Nov 2018 16:59:22 +0100 (CET)
Date: Fri, 23 Nov 2018 16:59:22 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@nic.cz>
CC: <netmod@ietf.org>
Message-ID: <20181123155922.gk4cpaowsoc33mqb@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: Ladislav Lhotka <lhotka@nic.cz>, 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> <20181123113341.br77pxmfhcwn6yck@anna.jacobs.jacobs-university.de> <d4e91369c2fe948fe6e2a884ee8dc889f6ce12c6.camel@nic.cz> <20181123123907.4wuuojmoikb7fegr@anna.jacobs.jacobs-university.de> <3c8272ada8f28ed41c0d7fc447fdded62f42bf13.camel@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <3c8272ada8f28ed41c0d7fc447fdded62f42bf13.camel@nic.cz>
User-Agent: NeoMutt/20180716
X-ClientProxiedBy: SXCHMB03.jacobs.jacobs-university.de (10.70.0.155) To sxchmb03.jacobs.jacobs-university.de (10.70.0.155)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9tEUQPjJugamEyNZwXFSgl3yRZQ>
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 15:59:28 -0000

On Fri, Nov 23, 2018 at 02:29:18PM +0100, Ladislav Lhotka wrote:
> On Fri, 2018-11-23 at 13:39 +0100, Juergen Schoenwaelder wrote:
> > On Fri, Nov 23, 2018 at 01:02:03PM +0100, Ladislav Lhotka wrote:
> > > > 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
> > > 
> > > The term "value space of a schema tree node" is not defined.
> > 
> > OK. So we say 'the value space of the type of the schema tree node'.
> 
> Yes, this is better. But what if the schema tree node is made invalid due to a
> failed "when" expression? Does it still apply?

Why do you think it would not?

> > > >    definining the referenced data tree node.
> > > 
> > > With require-instance=false there needn't be any referenced data tree node.
> > 
> > So we add "(irrespective whether the node exists or not).
> 
> If the data tree node doesn't exist, we cannot refer to the schema tree node
> that defines it.

What is the problem? There is a path on the instance data tree and it
seems decidable what the matching path in the schema tree is. Can you
construct an example where this is not decidable?

> If required-instance is true, there is no need to care about all this tricky
> stuff with schema tree nodes and their types. In other words:
> 
> 1. if required-instance = true, the permitted values are obtained from the data
> tree.
> 
> 2. if required-instance = false, the corresponding schema node has to be
> determined, and its type defines the permitted values of the leafref node.
> 
> It is an exclusive-or, #1 is not an "optional further restriction".

Since the data node values must comply to the data type of the schema
node, it is a further restriction. Anyway, you are welcome to propose
better wording or convince us that this can't be implemented. If it is
implementable, we should be able to describe how things work.

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