-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] fix interface IPv6 address removal. (#1819)
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 <stepanb@nvidia.com>
- Loading branch information
1 parent
0665d6f
commit ca728b8
Showing
2 changed files
with
134 additions
and
136 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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