Replace netutils function to keep non-strict IPv4 check
oslo.utils is updating the default strict mode for is_valid_ipv4[1] because the current default was deprecated in 4.8.0[2]. Replace the usage of is_valid_ipv4 to keep using the non-strict mode. [1] https://review.opendev.org/c/openstack/oslo.utils/+/903924 [2] https://review.opendev.org/c/openstack/oslo.utils/+/773863 Change-Id: I1e549209336721b00db3200439964bd697b39238
This commit is contained in:
parent
1b9b99b7db
commit
01e5aad630
@ -565,9 +565,7 @@ def remove_macs_from_lsp_addresses(addresses):
|
|||||||
"""
|
"""
|
||||||
ip_list = []
|
ip_list = []
|
||||||
for addr in addresses:
|
for addr in addresses:
|
||||||
ip_list.extend([x for x in addr.split() if
|
ip_list.extend([x for x in addr.split() if netutils.is_valid_ip(x)])
|
||||||
(netutils.is_valid_ipv4(x) or
|
|
||||||
netutils.is_valid_ipv6(x))])
|
|
||||||
return ip_list
|
return ip_list
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user