-
Notifications
You must be signed in to change notification settings - Fork 657
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
Switch Port Modes and VLAN CLI Enhancement #2419
Conversation
- What I did Modified config/vlan.py to add new commands with multiple and range options Creation of config/switchport.py which will deal with default Vlan1 Modified the show interface command so it will show the status of port being access or trunk. Before it did not show about access mode only trunk. Modified the Command-Reference.md file to add new commands in it with usage and examples Added new utility functions in utilities_common/cli.py for new Vlan.py and switchport.py commands - How I did Added new commands and modified the existing commands in config/vlan.py for example to accept multiple vids and range of vids in add|del vlan and add|del vlan member as well as except flag in vlan member command Creation of config/switchport.py file to add commands which will deal only with Default Vlan1 which was unable to be defined or assigned in SONiC before New utility functions in utilities_common/cli.py changes in scripts/intfutil. Modified the existing function and now it will display if an interface is in access mode or trunk mode with routed mode. - How to verify it New commands have been added in Command-Reference.md All the syntax and examples have been added there and they can be verified by running the specific command Signed-off-by: Muhammad Umar Asad <umarasad20@gmail.com> < xFlow Research Inc. >
|
This pull request introduces 2 alerts when merging 6b3ac13 into abd5eba - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 45fe3b8 into abd5eba - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging 7fe882b into abd5eba - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging 1d9daf1 into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging fb2921d into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging 15587ab into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging 4e660a2 into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging a507786 into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging 5cf9b60 into aedc05e - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging 63086ab into aedc05e - view on LGTM.com new alerts:
|
Modified './config/vlan.py' and added switchport mode checks in it as well as other small checks Modified './scripts/intfutil/' to show correct port mode with access option for 'show interfaces status' command and its subfunctions Added utilities functions in './utilities_common/cli.py' for './config/switchport.py' Updated mocktables according to the tests and addded 'Mode' attribute in PORT table as well as 'Vlan' to 'Mode' in intfutil and multi_asic tests expected outputs of vlan_test.py
We have modified our code along with HLD. Suggestions have been incorporated. @venkatmahalingam pls review. |
Fixed config_db_vlan_port_keys_get() in intfutil to show correct port mode updated test cases in '/tests/vlan_test.py' for enhanced vlan commands and new switchport commands which are used with vlan member commands Signed-off-by: Muhammad Umar Asad <umarasad20@gmail.com> xFlow Research Inc.
@venkatmahalingam can you please help to review this PR? Thanks. |
@qiluo-msft can you please help merge this PR , thanks. |
@qiluo-msft can you please help merge this PR? 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.
VLAN
related changes lgtm
@gechiang @venkatmahalingam can you please guide in this PR. Its reviewed and approved but still awaiting for merge, please help, thanks. |
I don't have any more concerns. Please help review and approve/merge this PR. |
@gechiang , @theasianpianist , @MuhammadUmarAsad , |
@liushilongbuaa I, have checked kvmtest failure. As of my understanding this PR has not made any change that blocked/cause failure in sonic-net/sonic-buildimage#16267 Updating sonic-utilites submodule. |
@ridahanif96 , it failed on vlan related command: |
All vlan related failure issues resolved. |
elif not is_port: | ||
port_data = config_db.get_entry('PORTCHANNEL',port) | ||
|
||
if "mode" not in port_data: |
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.
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.
@qiluo-msft ,
@venkatmahalingam @gechiang We have fixed YANG Model for this PR. The YANG PR is failing as it needs supported utilities sourcecode. One possible solution is that we merge #2419 utilities code and then we merge this PR. All dependencies will be solved.
Other solution is that we remove MUST condition from this PR for instance in sonic-vlan.yang for Vlan membership for only on access and trunk port and merge this PR and merge utilities source code. After that i will add a new PR with must condition check on sonic-vlan membership.It is requested to please help in this matter. Thanks!
What I did
Modified "/config/vlan.py" to add support for multiple vids, range of vids in
vlan add|del
andvlan member add|del
Creation of "/config/switchport.py" which will deal with port modes for interfaces i.e. access, trunk and routed
Created the
show interface switchport status
andshow interface switchport config
commands so that it shows the status of port either being access, trunk or routed.Modified
Command-Reference.md
to add new commands in it with usage and examplesAdded new utility functions in "/utilities_common/cli.py" to use in vlan.py and switchport.py commands
Modified test cases and added new test cases for the new commands
How I did it
Added new commands and modified the existing commands in "/config/vlan.py" to
except_flag
andall option
in vlan member commandCreation of "/config/switchport.py" file to add commands which will deal with port modes i.e. access, trunk or routed which we were unable to define or assign in SONiC before
New utility functions in "/utilities_common/cli.py"
Using
show interface switchport status
andshow interface switchport config
commands, it will display if an interface is in access or trunk or routed mode.How to verify it
New commands have been added in Command-Reference.md All the syntax and examples have been added there and they can be verified by running the specific command
Signed-off-by: Muhammad Umar Asad umarasad20@gmail.com [ xFlow Research Inc. ]