William Ivory <[email protected]> wrote: > Hi Martin, > > Thanks. Can you point me at the part of RFC 6020 that explicitly > states that 'when' wins over 'default'?
Section 7.6.1 of RFC 7950 says: Note that if the leaf or any of its ancestors has a "when" condition or "if-feature" expression that evaluates to "false", then the default value is not in use. /martin > > William > > -----Original Message----- > From: Martin Bjorklund [mailto:[email protected]] > Sent: 22 March 2017 17:53 > To: William Ivory <[email protected]> > Cc: [email protected]; Nick Brown <[email protected]> > Subject: Re: [netmod] Interaction of 'when' and 'default' statements > > William Ivory <[email protected]> wrote: > > Hi, > > > > I'm looking for clarification of the 'when' and 'default' statements > > on a leaf. For example, if a leaf has a 'default', can it also have a > > 'when' statement that could cause it to disappear if the 'when' > > condition evaluates to false? > > Yes, and in that case the default doesn't apply. > > > Section 8.3 or RFC 6020 isn't clear on how evaluation of constraints > > should be done here, and neither the section on the 'when' statement > > nor the 'default' section have any cross-references. > > If the "when" expression evaluates to false, it's like if the whole node > doesn't exist. A client can't set it etc. > > > /martin > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
