-
Notifications
You must be signed in to change notification settings - Fork 659
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
Update description of the model-name leaf. #1160
Update description of the model-name leaf. #1160
Conversation
/gcbrun |
No major YANG version changes in commit 11c36ff |
/gcbrun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some wordsmithing suggestions
Co-authored-by: Darren Loher <[email protected]>
Co-authored-by: Darren Loher <[email protected]>
/gcbrun |
model-name as a mandatory field when removable = true is the intent. I think this is good. It's a new precedent in OC as the few places we use mandatory are not conditional. I agree that |
/gcbrun |
Well, looks like our tool-chain in general does not support the mandatory field inside a where clause. (See the CI checks). I think a description stating this is mandatory when the component is 'removable' will need to suffice. |
This is failing because as-is currently is invalid YANG. A e.g.
|
Ok I have updated the mandatory stmt to not be nested in the when - @earies just want to confirm though that this leaf is still be optional even when ../removable is false? Also, does anyone know why in openconfig-vlan.yang I see an example of something nested in the when? Is it because descriptions are allowed in the when statement but not a mandatory? |
If The following is permitted
But either of the following is not
Example yanglint validation on the latter:
See the grammar defined in RFC 6020. Only the following substatements are permitted and optional.
|
/gcbrun |
Since "If not removable then model-name is not permitted whatsoever, it is not optional", I have updated the when statement to include an or for when the component is a chassis. This is because some vendors, for example in an Arista DCS-7808-CH device, set However, I need the model-name to be available for chassis components (the model-name of the chassis here would be something similar to "DCS-7808-CH") so that I can determine which model a device is from the chassis' telemetry. |
/gcbrun |
/gcbrun |
/gcbrun |
/gcbrun |
This was reviewed in the OC Community meeting on Sep 12, 2024 without objection. Setting last call to Sep 13, 2024. |
/gcbrun |
Change Scope