On Sat, Oct 24, 2015 at 03:07:41PM +0200, Martin Bjorklund wrote:
> Juergen Schoenwaelder <[email protected]> wrote:
> > On Fri, Oct 23, 2015 at 10:35:48AM +0200, Ladislav Lhotka wrote:
> > > Martin Bjorklund <[email protected]> writes:
> > > 
> > > > auto-deletion in choice/when should be described as a property of the
> > > > data model for the datastore.  Parts of the text from Section 8.2.2
> > > > should be made more generic and moved, probably to a new section
> > > > 8.1.1.   I will have a look at this.
> > 
> > [...]
> > 
> > > IMO YANG spec should tell what's valid and what isn't, and stop there.
> > 
> > As technical contributor, I tend to agree. The purpose of validation
> > should be to return a boolean - datastore is valid or invalid.
> 
> Right.  This is what "must" does.  "when" is different.  If a node's
> "when" expression becomes false, that node is deleted, and its other
> constraints are no longer used (e.g. must, mandatory etc).  These are
> two different use cases, two different tools available to the data
> model designer.
> 
> If we put "when" to the side for a moment, do you also think that
> there should be no auto-deletion of cases in a choice?

If I were to start from scratch, my answer would be most likely yes.

> If this discussion had started from implementation/deployment
> experience that said that "when" could not be implemented or that it
> made it difficult to write NMS system or something else, things would
> be different.  But now we have a feature that has been in use for 5+
> years, and there are several implementations of it out there, and now
> we say that it should be removed?  Or worse, keep the syntax but
> radically change the semantics.

Do independent implementations really behave the same? I am not sure,
the discussion around this makes me believe that it is somewhat likely
that they do not all do the same.

Reading section 7.19.5 of RFC 6020 again, I do not find the auto-deletion
described. I do see auto-deletion defined in section 7.9.6 for
NETCONF's edit-config operation. (The text does not say anything about
what happens if an attempt is made to create multiple cases, I guess
it is implementation dependent which choice will become effective but
one might also consider this an error - but clearly this is not
defined). I note that RFC 6020bis has lifted this auto-deletion up
from being a NETCONF edit-config property to a property that applies
to all protocols. (It still does not define what happens if an edit
creates multiple case branches.)

A proposal was made to declare "when" auto-deletion to be part of the
YANG data store validation process, that is, it applies to every
protocol interface. This means that a datastore not only needs to
maintain data that is being validated, it also needs to remember the
last edit (at least) in order to _guess_ what should be deleted during
validation.  It is the guessing part and the idea that the server
somehow tries to infer what the intention of the client was that makes
me (as a technical contributor) feel somewhat uncomfortable.

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

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to