Open rgwilton opened 7 years ago
Also need to clarify child nodes different status than parent Following example passes 100% with pyang. Even examples from RFC are allowed
RFC 7950, sec. 7.21.2 needs to be rewritten to address all issues listed above. Need to add some clarification if imported identifiers change from current to deprecated or obsolete.
IMHO there is a hierarchy current/deprecated/obsolete.
If a parent node (in the containment hierarchy) is obsolete, all child nodes are effectively obsolete even if they have a status current statement. If a container is not implemented because its obsolete there is no way to implement a contained "current" leaf .
If a parent node (in the containment hierarchy) is deprecated all child nodes are effectively either deprecated or obsolete. If I tell you that a container is deprecated meaning it might be obsolete soon thus its implementation will be removed, that also means that any contained leaf's implementation will also be removed at the same time. So current is not feasible for any child objects.
I agree that this should be clarified.
I would also suggest to align the definitions of the status terms with IANA, see my message.
Example of interplay between status and mandatory:
On Wed, Feb 27, 2019 at 01:08:49PM +0000, Balázs Lengyel wrote:
leaf myTimer { mandatory true; config true; status obsolete; type string; }
So should I configure myTimer or not? Today whatever I do, it might come back with an error. IMHO YANG should make it possible to write a correct config.
I know this is not the most important point for semver, so we might skip it, but it is not correct. Maybe keep it as an open issue.
regards Balazs
A slightly different problem for Example of interplay between status and mandatory feature oldFeature { status obsolete; }
leaf myTimer { if-feature oldFeature ; mandatory true; config true; status current; type string; }
So should I configure myTimer or not? Here the question is: What does it mean if a feature is obsolete? If a feature is obsolete what does that mean for nodes controlled by that feature? Does it mean that these nodes are also obsolete? Considering that myTimer can be controlled by multiple features there might not be a simple algorithmic answer. Maybe we should state that the designer must explicitly change the model to indicate the result.
If a grouping is deprecated does it mean that all the nodes created by using the grouping are also deprecated? What does it mean it is deprecated?
Yes because the grouping is deprecated. No because even if the grouping is deprecated (it is not recommended for reuse), the leafs created with it are still usable and there are no plans to remove them.
Same question for obsolete. Same question for typedef.
So should I configure myTimer or not?
If the server advertises 'oldFeature' then you must configure 'myTimer'.
Here the question is: What does it mean if a feature is obsolete? If a feature is obsolete what does that mean for nodes controlled by that feature? Does it mean that these nodes are also obsolete?
No.
Considering that myTimer can be controlled by multiple features there might not be a simple algorithmic answer. Maybe we should state that the designer must explicitly change the model to indicate the result.
Right; this is an argument for explicit status statements.
If a grouping is deprecated does it mean that all the nodes created by using the grouping are also deprecated?
No
What does it mean it is deprecated?
It means that new models should not use that grouping.
Yes because the grouping is deprecated. No because even if the grouping is deprecated (it is not recommended for reuse), the leafs created with it are still usable and there are no plans to remove them.
Same question for obsolete.
Maybe we should say that if a defintiion is obsolete in revision X, and the server advertises X, then it must not implement the obsolete definitions. I.e., obsolete would work exactly as if the definition has been removed. (Maybe it can even be removed in revision X+1)
Same question for typedef.
Same answer.