-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Switchport Modes Port & Port Channel Yang Model Configurations #13580
Conversation
Please help on the review. Thanks. |
Please fix unit test: libyang[0]: Invalid keyword "routed|access|trunk.". (path: /sonic-port:sonic-port/PORT/PORT_LIST/mode) |
This will target 202305 release. |
@ridahanif96 will fix the build failure. |
@@ -208,6 +210,7 @@ module sonic-vlan { | |||
type inet:ipv6-address; | |||
} | |||
|
|||
|
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.
unnecessary empty line.
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.
Fixed
@@ -221,6 +224,8 @@ module sonic-vlan { | |||
leaf mac { | |||
type yang:mac-address; | |||
} | |||
|
|||
|
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.
unnecessary empty line.
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.
Fixed
@@ -240,22 +245,29 @@ module sonic-vlan { | |||
} | |||
} | |||
|
|||
leaf port { | |||
leaf port | |||
{ |
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.
Don't change format here.
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.
Fixed
/* key elements are mandatory by default */ | ||
type union { | ||
type leafref { | ||
type leafref |
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.
Don't change format here.
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.
Fixed
@@ -89,7 +89,7 @@ | |||
"description": "Ethernet0", | |||
"mtu": 9000, | |||
"name": "Ethernet0", | |||
"speed": 25000 | |||
"speed": 25000 |
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.
space at end of line
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.
Removed!
@@ -193,7 +193,7 @@ | |||
"description": "Ethernet1", | |||
"mtu": 9000, | |||
"name": "Ethernet1", | |||
"speed": 25000 | |||
"speed": 25000 |
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.
space at end of line
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.
Removed!
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
@qiluo-msft please help merge this PR! Thanks! |
@qiluo-msft can you pls help merge this PR! Thanks |
We need the port mode change. |
@qiluo-msft pls merge this PR |
This is disruptive change per @qiluo-msft |
leaf mode { | ||
description "SwitchPort Modes possible values are routed|access|trunk. Default value for mode is routed"; | ||
type stypes:switchport_mode; | ||
default "routed"; |
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 default value will introduce disruptive change. The current behavior is conditional "default value".
#### Why I did it Removed Default Mode value from sonic-port.yang & sonic-portchannel.yang to avoid disruptive change #### How I did it This PR is created in reference with [PR](#13580)
Why I did it
Modified "sonic-port.yang" for adding support in Port Yang model for the "mode" attribute for adding port modes
Modified "sonic-portchannel.yang" for adding support in Port Channel Yang model for the "mode" attribute for adding port modes
Updated tests for these modifications
How to verify it