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:
Takashi Kajinami 2024-11-01 01:34:10 +09:00
parent 1b9b99b7db
commit 01e5aad630

View File

@ -565,9 +565,7 @@ def remove_macs_from_lsp_addresses(addresses):
"""
ip_list = []
for addr in addresses:
ip_list.extend([x for x in addr.split() if
(netutils.is_valid_ipv4(x) or
netutils.is_valid_ipv6(x))])
ip_list.extend([x for x in addr.split() if netutils.is_valid_ip(x)])
return ip_list