Switchport Mode & CLI Modified Fix#3247
Conversation
|
Hi @theasianpianist , @prsunny @venkatmahalingam can you please help review this PR. |
wen587
left a comment
There was a problem hiding this comment.
lgtm. Please check with other reviewer.
Hi All, Can you help with review this PR. Thanks. |
theasianpianist
left a comment
There was a problem hiding this comment.
Vlan changes lgtm
|
Hi @prsunny & @venkatmahalingam , can you please help with review. Thanks in advance, |
|
Can you please confirm there is no changes to existing 'show' commands? I see there is a new show CLI command which is ok. |
|
Please confirm, this issue is fixed in this PR - sonic-net/sonic-buildimage#18392 |
Hi @prsunny , we didn't make any change in exisiting show commands i.e in "show vlan brief" & "show int status". We proposed new show commands for switchport mode i.e "show int switchport config" & "show int switchport status" |
Yes, We have checked this change with latest build. Please see behavior |
|
Hi @wen587 Do you also suggest change for this PR in sonic_mgmt/gcu/test_vlan.py? |
|
@venkatmahalingam Hi Venkat, can you pls help review this PR. |
|
|
||
| def vlan_range_list(ctx, vid_range: str) -> list: | ||
|
|
||
| vid1, vid2 = map(int, vid_range.split("-")) |
There was a problem hiding this comment.
Hi @qiluo-msft, this function is only called if "-" is present in the argument passed to the VLAN command. If there is no "-" character in the argument provided, then it will be considered as a comma-separated list instead, not as a range. This behavior can be seen in the multiple_vlan_parser() function defined on line 289 in utilities-common/cli.py
a4194c3 to
55ded95
Compare
|
Waiting on @prsunny approval. |
|
|
||
| # Add a validation to check this interface is not a member in vlan before | ||
| # changing it to a router port | ||
| vlan_member_table = config_db.get_table('VLAN_MEMBER') |
There was a problem hiding this comment.
We have added a check for switchport mode routed, a routed port fulfill this behavior that a interface has a vlan membership or not. So this check becomes redundant after addition of new check.
This PR is Fixture for sonic-net#3108 The PR was reverted due to backward compatibility issues. As per new suggestions, removed db migrator changes from this new change along with vlan.py & switchport.py changes To Fix issues as per suggestions removed default mode from YANG model and removed minigraph changes: 1. Removed Db migrator changes from code. 2. Modified Vlan.py & Switchport.py changes 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
#### What I did This PR is Fixture for sonic-net#3108 The PR was reverted due to backward compatibility issues. As per new suggestions, removed db migrator changes from this new change along with vlan.py & switchport.py changes To Fix issues as per suggestions removed default mode from YANG model and removed minigraph changes: #### How I did it 1. Removed Db migrator changes from code. 2. Modified Vlan.py & Switchport.py changes #### 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




What I did
This PR is Fixture for #3108 The PR was reverted due to backward compatibility issues. As per new suggestions, removed db migrator changes from this new change along with vlan.py & switchport.py changes
To Fix issues as per suggestions removed default mode from YANG model and removed minigraph changes:
How I did it
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