Merge "Use oslo.utils to format IPv6 address"

This commit is contained in:
Zuul authored and Gerrit Code Review committed 2026-09-29 19:56:41 +00:00
commit 090bc3807a
1 file changed
+1 -5
+1 -5
View File
@@ -51,8 +51,4 @@ def valid_ipv6_url(host, port):
RFC2732 https://tools.ietf.org/html/rfc2732
square brackets always required in ipv6 URI.
"""
if netutils.is_valid_ipv6(host):
uri = f'[{host}]:{port}'
else:
uri = f'{host}:{port}'
return uri
return f'{netutils.escape_ipv6(host)}:{port}'