-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Yang-models] Update sonic-vlan.yang to better constrain Vlan name #18207
[Yang-models] Update sonic-vlan.yang to better constrain Vlan name #18207
Conversation
~ Signed-off-by: matiAlfaro <mati@marvell.com>
Thanks for the effort to improve sonic-vlan.yang! |
@@ -178,7 +182,7 @@ module sonic-vlan { | |||
|
|||
leaf name { | |||
type string { | |||
pattern 'Vlan([0-9]{1,3}|[1-3][0-9]{3}|[4][0][0-8][0-9]|[4][0][9][0-4])'; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
The original regex allows for Vlan0, Vlan00, Vlan000, Vlan01 ext...
I'll have a go at #12256
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.
you're right, the first group in original regex was too broad. And thanks!
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.
lgtm
~
Related to #3155
Update sonic-vlan.yang model to match requirement as described in #16975
Why I did it
Work item tracking
How I did it
Update Vlan name regex
Update runVlanSpecialTest to skip Vlan0 (as it is illegal)
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
master
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)