-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecated
statement under uses
statement
#1113
Comments
The Yang RFC 6020 Section 7.12.1 says However, my intuition is that the status field should only be used on nodes and types that appear in the tree (ie: leaf, container, typedef etc) and not to yang language like groupings or uses. Would this have the effect you're looking for? |
Personally I disagree with the statements in mbj4668/pyang#577 There is no verbiage in YANG 1.0 or 1.1 stating inheritance rules which then I assume could be interpreted as there are none thus means every node must be explicitly marked. https://datatracker.ietf.org/doc/html/rfc6020#section-7.19.2 However I believe that a If a container is marked as deprecated, then how could its children not be? If a container is marked as obsolete, then how could its children not be? Regarding proper tree rendering, that is a secondary issue once above is solved imo |
mbj4668/pyang#577 (comment) provides their opinion that inheritance is not supported, so they agree with you Ebben. They say to properly deprecate a container or uses statement, one must deprecate each node individually. I guess a side effect of this is if a uses statement appears in multiple places, and one is deprecated and the other isn't, then you'd need to restructure your model to achieve your intent. |
Well so I think there are a few things here...
That means that another use of that grouping could very well be In addition is node inheritance which I cannot think of a good reason where you flag a container or list as In the order of e.g.
Would everyone agree? I believe the statements in the pyang PR are interpretation of the RFC since inheritance is not explicitly called out in any of above forms |
I am facing a similar issue here: #1140 |
It seems that when deprecating
uses
statement in order to restructure the model, the pyang output is not able to represent this at all. This causes restructuring of groupings to be much harder to notice, especially when trying to maintain backwards compatibility. The output of pyang would contain all of the paths and nothing will be indicated as deprecated (x--rw <node>
vs+--rw <node>
)Doing a bit of research, the pyang devs interpreted the RFC for deprecated to not be recursively applied for containers (See mbj4668/pyang#577). Looking at both RFC6020 and RFC7950 there isn't a defined behavior for the
uses
statement.What would be the guidance for OpenConfig wrt. adding
status deprecated;
touses
statements?The PR #1105 is one of such changes that are affected by this.
For example:
The text was updated successfully, but these errors were encountered: