Balazs Lengyel <[email protected]> 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.


/martin


> regards Balazs
> 
> On 2015-10-13 13:30, Martin Bjorklund wrote:
> > Balazs Lengyel <[email protected]> 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: [email protected]
> 

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

Reply via email to