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

Robert Wilton <rwilton@cisco.com> Fri, 23 November 2018 13:37 UTC

Return-Path: <rwilton@cisco.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 ACB15127B92 for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 05:37:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.96
X-Spam-Level:
X-Spam-Status: No, score=-15.96 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 F-CDgMyHMBb0 for <netmod@ietfa.amsl.com>; Fri, 23 Nov 2018 05:37:37 -0800 (PST)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 43C861277D2 for <netmod@ietf.org>; Fri, 23 Nov 2018 05:37:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3911; q=dns/txt; s=iport; t=1542980257; x=1544189857; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=qEoiUHBRkG0eA7eSuegQhMEAHBs7C/OyqGA1m3u+txs=; b=T8Wd9ArF+HLe+kBj+t+XaJvHrK3FQmVd+x6N+6fDDgBMd0Sv0FIUGhZH tZS3CYvoFPUMi0VKCFfpFL4/hfMT3xvDoG4PoUYYOYr3pCNUK9PJ0bb4X K3CSLQgpx6eiRD0c0gs9mezasrexMWN1teKd3DLh41lrgVqu6jZr+MIVu g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AHAAAHAvhb/xbLJq1ZChkBAQEBAQEBAQEBAQEHAQEBAQEBgVMCAQEBAQELAYNZEoQgiHeNAC2XO4F6DYRsAoQ3NgcNAQMBAQIBAQJtKIU9AQUjFVELGAICJgICVwYBDAgBAYMdggKmf4EvhUCEWYELixWBQD+BOIFtUC6EU4MvglcCiRmGQ4ECjyQJkSkGGIlhhyeCeI5XhmGBTQ0kgVUzGggbFTuCbZBZPwONWAEB
X-IronPort-AV: E=Sophos;i="5.56,270,1539648000"; d="scan'208";a="8306236"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Nov 2018 13:37:20 +0000
Received: from [10.63.23.68] (dhcp-ensft1-uk-vla370-10-63-23-68.cisco.com [10.63.23.68]) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id wANDbKYS002476; Fri, 23 Nov 2018 13:37:20 GMT
To: Ladislav Lhotka <lhotka@nic.cz>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, 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>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <0467b647-1b3b-6b79-e568-8cb9526d1af3@cisco.com>
Date: Fri, 23 Nov 2018 13:37:20 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1
MIME-Version: 1.0
In-Reply-To: <3c8272ada8f28ed41c0d7fc447fdded62f42bf13.camel@nic.cz>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.68, dhcp-ensft1-uk-vla370-10-63-23-68.cisco.com
X-Outbound-Node: aer-core-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/55XgZiRNfhgTB_1OJdB10Jjo7Hs>
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 13:37:40 -0000

On 23/11/2018 13:29, 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?

I might be being picky, but it isn't absolutely clear from the text 
which node "schema tree node" refers to.

Hence I wonder whether it might be better to say "...identify the 
referenced leaf or leaflist ..." and "value space of the referenced 
schema tree node".

Thanks,
Rob


>
>>   
>>>>     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.
>
>>>> 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
>>> Right. In this case it is not "further restricted" but rather there is a
>>> discrete set of possible values.
>> A discrete set of possible values is a restriction so I do not
>> understand your comment. So here is the next iteration:
> 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".
>
> Lada
>
>> 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 (see
>>      Section 9.9.3).  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
>>      type of the schema tree node definining the referenced data tree
>>      node (irrespective whether the referenced data tree node exists or
>>      not).
>>
>> /js
>>