On Wed, Dec 21, 2016 at 2:54 AM, Martin Bjorklund <[email protected]> wrote:
> Andy Bierman <[email protected]> wrote: > > On Wed, Dec 21, 2016 at 1:32 AM, Martin Bjorklund <[email protected]> > wrote: > > > > > Ladislav Lhotka <[email protected]> wrote: > > > > Martin Bjorklund <[email protected]> writes: > > > > > > > > > Robert Wilton <[email protected]> wrote: > > > > >> Hi, > > > > >> > > > > >> The definition of "status" in RFC 7950 in section 7.21.2 (full > text > > > > >> below), states: > > > > >> > > > > >> If no status is specified, the default is "current". > > > > >> > > > > >> From my interpretation of the text in the draft, this implies > that the > > > > >> status of the "new" child leaf in the following example is > "current", > > > > >> and that this example is allowed! > > > > >> > > > > >> My questions are: > > > > >> - Is my interpretation of the current text correct? > > > > > > > > > > Yes. > > > > > > > > > >> - Is this actually the best behaviour, or should it inherit like > the > > > > >> config statement? > > > > > > > > > > I think the idea was that if the status != current, it is better > for > > > > > the reader if it is explicitly stated. > > > > > > > > > >> Should I raise an errata for this? > > > > > > > > > > No. > > > > > > > > > > However, we could have said that a current node under a deprecated > > > > > node (etc) in the same module is an error, in order to force people > > > > > (through the useage of YANG validators) to detect and fix this. > > > > > > > > Since "current" is the default, correctly deprecating a subtree would > > > > mean to explicitly add the "status" statement to every single node in > > > > the subtree. > > > > > > Yes. > > > > > > > Please explain what it means for YANG to say > > "The parent node is deprecated and going away but the child nodes are > not. > > They are current and are staying around." This does not seem to make any > > sense. > > Agreed. But this should be invalid also if the status statements are > given explicitly: > IMO the default should be inherit from parent, like the config-stmt. It clutters the YANG module to add a status-stmt to every descendant node. The status also applies to augment. If /foo is deprecated than any external augments that adds nodes under /foo is also deprecated. (Most obvious when you change deprecated to obsolete). > > container a { > status deprecated; > container b { > status current; > } > } > > I tested pyang with explicit statements and no warnings are given: container A { status deprecated; leaf AA { type string; status current; } } container B { status obsolete; leaf BB { type string; status current; } } > Clearly an obsolete node removes all access of its descendant nodes. > > There is no way to access /foo/child if /foo has been removed from the > > server. > > Yes. > > > So how do I access a deprecated /foo/child node inside an obsolete /foo > > container? > > You can't. > So the status-stmt clearly applies to descendant-or-self. > > > /martin > Andy
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
