Andy Bierman <[email protected]> writes: > Hi, > > > I have to report that at least 1 customer agrees with you about > auto-deletion. > The comment was "how are we supposed to tell there is a bug in the client > if we do not get back an error instead of silent deletion?"
This is not only a matter of bugs in client code but also of human errors and typos: an operator might not realize that making a configuration change might trigger auto-deletion in remote parts of the data tree. I think that sane models should use "when" in a very restricted and localised way, as most modules so far do, e.g. making a node conditional with respect to the value of a sibling leaf. > > A: use "must" instead of "when" and you will get an error right away. > > In hindsight, perhaps NETCONF should have the equivalent of the --force > option > in many Unix commands. e.g., only do the auto-deletion if --force is > present > otherwise return an error that auto-deletion would have occurred. I was thinking about the same. It is conceivable that different apps and users might want different behavior for the same node - but it would be impossible if one alternative is hard-wired in YANG spec. Lada > > > Andy > > > On Thu, Oct 22, 2015 at 3:45 AM, Balazs Lengyel <[email protected] >> wrote: > >> Hello, >> I STRONGLY agree with Andy, Interfaces MUST work the same way. >> Autodeletion MUST work or NOT work for all interfaces (Netconf, Restconf, >> CLI, GUI, etc.) the same way. IMO it is not a protocol issue. It is part of >> the YANG definition. >> >> The whole idea behind model driven OAM is that we have one model that >> works (mostly) the same way on all interfaces. The more differences we have >> the less usable the product, the more difficult to implement. >> regards Balazs >> >> On 2015-10-21 15:07, Andy Bierman wrote: >> >> >> >> On Wed, Oct 21, 2015 at 5:46 AM, Ladislav Lhotka < <[email protected]> >> [email protected]> wrote: >> >>> >>> > On 21 Oct 2015, at 14:33, Andy Bierman < <[email protected]> >>> [email protected]> wrote: >>> > >>> > Hi, >>> > >>> > IMO we do not need lots of rules for when-stmt. >>> > They are harder to enforce than just implementing the auto-deletion. >>> > >>> > Note that auto-deletion also applies to nodes already in candidate or >>> running. >>> > It is just a derivative case to have a newly-created node deleted right >>> away. >>> > If you add node /foo it may cause node /bar and node /baz to get >>> deleted. >>> > >>> > I strongly object to treating a false when-stmt in a datastore >>> validation >>> > as an error. This is not how YANG 1.0 works, and this is not >>> > backward-compatible. >>> >>> I think it has nothing to do with YANG (1.0 or whatever), and RFC 6020 >>> correctly describes this auto-deletion behaviour for "choice" in sec. 7.9.6 >>> NETCONF <edit-config> Operations. It is indeed protocol business - YANG >>> spec should just define what's valid and what isn't. >>> >>> IMO RESTCONF spec doesn't require auto-deletion. >>> >>> >> >> Our server uses the same validation engine for both protocols. >> RESTCONF does not change the behavior of YANG in any way. >> I don't see how YANG validation procedures would not apply to RESTCONF. >> >> YANG says that the node semantics apply IFF the when-stmt evaluates to >> true. >> It is up to the implementation to enforce that. It applies to >> server-created >> nodes or nodes created via some protocol. >> >> >> Lada >>> >> >> Andy >> >> >>> >>> > >>> > >>> > Andy >>> > >>> > >>> > On Wed, Oct 21, 2015 at 5:16 AM, Balazs Lengyel < >>> <[email protected]>[email protected]> wrote: >>> > Hello Martin, >>> > I would want to codify this. My earlier proposal was: >>> > >>> > - when MUST NOT be dependent on a data node controlled by a when or >>> choice statement >>> > >>> > Notice the strong MUST NOT statement. This would simplify life greatly. >>> > regards Balazs >>> > >>> > On 2015-10-20 10:09, Martin Bjorklund wrote: >>> > I have never seen anyone trying to refer to the conditional nodes in a >>> > when expression - simply b/c it doesn't make any sense. >>> > >>> > -- >>> > Balazs Lengyel Ericsson Hungary Ltd. >>> > Senior Specialist >>> > ECN: 831 7320 >>> > Mobile: +36-70-330-7909 email: >>> <[email protected]>[email protected] >>> > >>> > _______________________________________________ >>> > netmod mailing list >>> > [email protected] >>> > https://www.ietf.org/mailman/listinfo/netmod >>> > >>> >>> -- >>> Ladislav Lhotka, CZ.NIC Labs >>> PGP Key ID: E74E8C0C >>> >>> >>> >>> >>> >> >> -- >> Balazs Lengyel Ericsson Hungary Ltd. >> Senior Specialist >> ECN: 831 7320 >> Mobile: +36-70-330-7909 email: [email protected] >> >> -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
