Subject: Re: [netmod] evaluation of "when" under NMDA
From: Juergen Schoenwaelder <[email-masked]>
To: Ladislav Lhotka <[email-masked]>
Cc: NETMOD WG <[email-masked]>
Date: Tue, 5 Dec 2017 11:25:54 +0100
List-Id: NETMOD WG list <netmod.ietf.org>

On Tue, Dec 05, 2017 at 10:03:07AM +0100, Ladislav Lhotka wrote:
> On Mon, 2017-12-04 at 21:00 +0100, Juergen Schoenwaelder wrote:
> > On Mon, Dec 04, 2017 at 07:09:51PM +0100, Ladislav Lhotka wrote:
> > > 
> > > 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.
> > > 
> > > 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>, then the former can hardly be
> > > a superset of the latter.
> > 
> > I do not follow your notion of 'schema node is valid or not'. Where is
> > this concept defined? I think RFC 7950 talks about validation of data
> 
> Guess what, this notion is used in the definition of "when" statement (sec.
> 7.21.5):
> 
>    The "when" statement makes its parent data definition statement
>    conditional.  The node defined by the parent data definition
>    statement is only valid when the condition specified by the "when"
>    statement is satisfied. ...
> 
> This text clearly talks about a schema node, because it is what data definition
> statements define.

This is not how I understand the text. Perhaps a clearer phrasing
would have been this:

     The "when" statement makes its parent data definition statement
     conditional.  A node in the data tree corresponding to the parent
     data definition statement is only valid when the condition
     specified by the "when" statement is satisfied. ...

For me, the schema is static, the schema does not change with the
content of the data tree. YANG specifies what a valid data tree is, I
do not thnk it defines schemas that mutate according to some notion of
schema validity.

> > trees against a "schema". Perhaps there are places where the wording
> > is not clear enough? I know that there are places where the RFC 7950
> > text says just "node" without being explicit about the distinction
> > between schema node and corresponding data nodes. If this is an issue
> 
> Note that data node is just a special type of schema node (sec. 3).

Oops, yes I meant 'node in the data tree' or 'data node instance' or
'data tree node' (it seems we have no term for this and data node is
indeed used for a different purpose).

> > here, we may consider posting erratas to clear things up.
> 
> Right, the text above could say "The schema node defined ..." but it can never
> say "an instance of a data node" because "when" can also be used for "choice",
> "case" and "augment", and then there is no conditional (parent) instance.

The first thing is to settle on what the intention of the YANG
specification was and then we can discuss how to fix any wording
ambiguities. It seems we do not even agree on the intention so far.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>