Re: [netmod] evaluation of "when" under NMDA

Ladislav Lhotka <lhotka@nic.cz> Tue, 05 December 2017 16:07 UTC

Return-Path: <lhotka@nic.cz>
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 C1685129557 for <netmod@ietfa.amsl.com>; Tue, 5 Dec 2017 08:07:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=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 TXF3EfZU9zIl for <netmod@ietfa.amsl.com>; Tue, 5 Dec 2017 08:07:14 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 699D2127342 for <netmod@ietf.org>; Tue, 5 Dec 2017 08:07:14 -0800 (PST)
Received: by trail.lhotka.name (Postfix, from userid 109) id 6E79D18215DE; Tue, 5 Dec 2017 17:06:08 +0100 (CET)
Received: from localhost (cst-prg-19-60.cust.vodafone.cz [46.135.19.60]) by trail.lhotka.name (Postfix) with ESMTPSA id 143D91820F78; Tue, 5 Dec 2017 17:06:03 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: j.schoenwaelder@jacobs-university.de, netmod@ietf.org
In-Reply-To: <20171204.220916.1239542403096469961.mbj@tail-f.com>
References: <1512407158.6635.8.camel@nic.cz> <20171204172247.rj3ilazharvzbyn6@elstar.local> <1512410991.8751.4.camel@nic.cz> <20171204.220916.1239542403096469961.mbj@tail-f.com>
Mail-Followup-To: Martin Bjorklund <mbj@tail-f.com>, j.schoenwaelder@jacobs-university.de, netmod@ietf.org
Date: Tue, 05 Dec 2017 17:06:57 +0100
Message-ID: <87374pduqm.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/gHHe6JOeX2kg3QuUvCbiSoZbWDg>
Subject: Re: [netmod] evaluation of "when" under NMDA
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, 05 Dec 2017 16:07:21 -0000

Martin Bjorklund <mbj@tail-f.com> writes:

> Ladislav Lhotka <lhotka@nic.cz> wrote:
>> On Mon, 2017-12-04 at 18:22 +0100, Juergen Schoenwaelder wrote:
>> > On Mon, Dec 04, 2017 at 06:05:58PM +0100, Ladislav Lhotka wrote:
>> > > On Mon, 2017-12-04 at 17:34 +0100, Martin Bjorklund wrote:
>> > > > Ladislav Lhotka <lhotka@nic.cz> wrote:
>> > > > > Hi,
>> > > > > 
>> > > > > if we have
>> > > > > 
>> > > > > augment "/target/node" {
>> > > > >   when "...";
>> > > > >   ...
>> > > > > }
>> > > > > 
>> > > > > is the "when" expression supposed to be evaluated separately in each
>> > > > 
>> > > > datastore,
>> > > > > and the augment applied only in those datastores where the result is
>> > > > > true?
>> > > > 
>> > > > Yes.
>> > > 
>> > > But then it cannot be guaranteed that the schema for <operational> is a
>> > > superset
>> > > of the schema of configuration datastores - the when expression can evaluate
>> > > to
>> > > false in <operational> but true in <intended>.
>> > > 
>> > 
>> > For me, its still the same schema - a when expression does not change
>> > my notion of 'schema'.
>
> Agreed.
>
>> Well, according to draft-ietf-netmod-revised-datastores-07:
>> 
>>    o  datastore schema: The combined set of schema nodes for all modules
>>       supported by a particular datastore, taking into consideration any
>>       deviations and enabled features for that datastore.
>
> This text does not write that nodes with false when expressions are
> not considered part of the schema.
>
>> And "when" determines whether a given schema node is valid or not. So if a
>> schema node is invalid in the schema of <operational> but valid in the schema of
>> <intended>
>
> They are still part of the schema.
>
> Again, it is a matter of terminology - when we say that the "schema"
> of <operational> is a superset of the "schema" of the conventional
> datastores, we do not exclude false when expressions from the
> "schema".  As per the defintion above we include the modules, their
> features and deviations in the term "schema".

My understanding was that superset means that the schema tree of
<intended> has to be a subtree of <operational> schema tree. The
paragraph in revised-datastores-07 seems to support this interpretation
as it talks about "YANG nodes omitted from <operational>", not about
modules, features and deviations:

   The datastore schema for <operational> MUST be a superset of the
   combined datastore schema used in all configuration datastores except
   that YANG nodes supported in a configuration datastore MAY be omitted
   from <operational> if a server is not able to accurately report them.

Lada


>
>
> /martin
>
>
>
>>, then the former can hardly be a superset of the latter.
>> 
>> Lada
>> 
>> > 
>> > /js
>> > 
>> -- 
>> Ladislav Lhotka
>> Head, CZ.NIC Labs
>> PGP Key ID: 0xB8F92B08A9F76C67
>> 
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>> 

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67