On Wed, Oct 14, 2015 at 12:25 PM, Martin Bjorklund <m...@tail-f.com> wrote:
> Balazs Lengyel <balazs.leng...@ericsson.com> wrote: > > Hello Martin, > > I agree that A1 is what follows the spirit of YANG, but then IMHO you > > should change/correct 8.2.1 in YANG because that implies A2 and error. > > Ok, I agree. I suggest we remove from 8.2.1: > > o If data for a node tagged with "when" is present, and the "when" > condition evaluates to "false", the server MUST reply with an > "unknown-element" error-tag in the rpc-error. > > and add to 8.2.2: > > o Modification requests for nodes tagged with "when", and the "when" > condition evaluates to "false". In this case the server MUST reply > with an "unknown-element" error-tag in the rpc-error. > > > This seems like a BIG protocol change to <edit-config> behavior. IMO this not an error at all. In our server the false-when data is just pruned, and no error is ever sent for a pruned when=false data node. It may be a client programming error for the client to provide false when nodes or not. What if the client is reusing some code that sends 5 parameters, it it's OK if 1 of them gets pruned sometimes because of a false when (e.g, product feature-specific knob and that feature is not installed) BTW, this is a really good example of what not to do, if one wants to make the YANG specification protocol independent. > /martin > > Andy > > > regards Balazs > > > > On 2015-10-13 13:30, Martin Bjorklund wrote: > > > Balazs Lengyel <balazs.leng...@ericsson.com> wrote: > > >> Hello Martin, > > >> If I had a model > > >> > > >> leaf a {type boolean;} > > >> leaf b { > > >> when a > > >> type int8; > > >> } > > >> > > >> if "a" is false and then you get an edit config with: set b=5 ; set > > >> a=true > > >> What should be the result? > > >> A1) this should succeed as at commit time the "when" will be true. > > > yes. > > > > > >> A2) this should fail as at parsing (as described in 8.2.1 of the YANG > > >> RFC) the when is false - yet. This would also mean that you need 2 > > >> edit-configs to set b=5. > > >> regards Balazs > > > > > > /martin > > > > -- > > Balazs Lengyel Ericsson Hungary Ltd. > > Senior Specialist > > ECN: 831 7320 > > Mobile: +36-70-330-7909 email: balazs.leng...@ericsson.com > > > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod >
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod