> On 26 Oct 2015, at 10:42, Juergen Schoenwaelder 
> <[email protected]> wrote:
> 
> 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.

Same here.

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

For one, libnetconf [1] doesn't do auto-deletion because it uses DSDL schemas 
for validation, and DSDL deliberately restricts the ways in which the validated 
XML infoset can be manipulated.

[1] https://github.com/cesnet/libnetconf

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

Not yet, I believe, and I would be opposed to such a change.

Lada 

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

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C




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

Reply via email to