[202106] [config] fix interface IPv6 address removal#1909
Merged
judyjoseph merged 1 commit intosonic-net:202106from Nov 3, 2021
Merged
[202106] [config] fix interface IPv6 address removal#1909judyjoseph merged 1 commit intosonic-net:202106from
judyjoseph merged 1 commit intosonic-net:202106from
Conversation
Current code takes an input from the user, converts the IPv6 string to lower letters and removes lower case IPv6 string from CONFIG DB. This is a bug since, according to the schema CONFIG DB is case insensitive for IPv6 address. - What I did Fixed CLI for removing IPv6 address. Issue is that below command does not work if IP address is written in upper case in CONFIG DB, like this: FC00::1/64. 'config interface ip remove Ethernet0 FC00::1/64' - How I did it Make it case insensitive Relaxed the validation of IP address, a built-in validation from ipaddress package in python is used. Refactored interface_ipaddr_dependent_on_interface -> get_interface_ipaddresses Separated some functions (has_static_routes_attached, flush_ip_neigh_in_kernel, can_remove_router_interface, remove_router_interface_ip_address, remove_router_interface, is_management_interface) - How to verify it Run UT. Try to reproduce the scenario described above. Signed-off-by: Stepan Blyschak <[email protected]>
Collaborator
|
@prsunny as this was prev reviewed and approved by you on master, could you please help to review and merge this one as well? |
prsunny
approved these changes
Nov 3, 2021
Contributor
|
@judyjoseph , please merge |
Contributor
there was test failure, but found it was because the run was cancelled due to > 3hrs run. Merged the same. |
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Apr 18, 2022
* c3691d3 [202012][pfcwd] Convert polling interval from ms to us in LUA scripts (sonic-net#1909) * 549c804 Mux state order change (sonic-net#1902) * 6b0b2c4 Update acl type check logic (sonic-net#1886) Signed-off-by: Volodymyr Samotiy <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current code takes an input from the user, converts the IPv6 string to lower letters and removes lower case IPv6 string from CONFIG DB. This is a bug since, according to the schema CONFIG DB is case insensitive for IPv6 address.
What I did
Fixed CLI for removing IPv6 address.
Issue is that below command does not work if IP address is written in upper case in CONFIG DB, like this: FC00::1/64.
'config interface ip remove Ethernet0 FC00::1/64'
How I did it
Make it case insensitive
Relaxed the validation of IP address, a built-in validation from ipaddress package in python is used.
Refactored interface_ipaddr_dependent_on_interface -> get_interface_ipaddresses
Separated some functions (has_static_routes_attached, flush_ip_neigh_in_kernel, can_remove_router_interface, remove_router_interface_ip_address, remove_router_interface, is_management_interface)
How to verify it
Run UT. Try to reproduce the scenario described above.
Signed-off-by: Stepan Blyschak [email protected]
What I did
How I did it
How to verify it
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)