Skip to content

Commit

Permalink
[6.15.z] Fix ipv6 proxy url validation (#15615)
Browse files Browse the repository at this point in the history
Fix ipv6 proxy url validation (#15594)

Fix ipv6 proxy url validation:

http_proxy_url is validated in Validators already

(cherry picked from commit a6b4131)

Co-authored-by: dosas <[email protected]>
  • Loading branch information
Satellite-QE and dosas authored Jul 9, 2024
1 parent dee15c4 commit b71d12b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ def enable_capsule_downstream_repos(self):

def enable_ipv6_http_proxy(self):
"""Execute procedures for enabling IPv6 HTTP Proxy on Capsule using SM"""
if all([settings.server.is_ipv6, settings.server.http_proxy_ipv6_url]):
if settings.server.is_ipv6:
url = urlparse(settings.server.http_proxy_ipv6_url)
self.enable_rhsm_proxy(url.hostname, url.port)

Expand Down Expand Up @@ -1826,7 +1826,7 @@ def _swap_nailgun(self, new_version):

def enable_ipv6_http_proxy(self):
"""Execute procedures for enabling IPv6 HTTP Proxy"""
if not all([settings.server.is_ipv6, settings.server.http_proxy_ipv6_url]):
if not settings.server.is_ipv6:
logger.warning(
'The IPv6 HTTP Proxy setting is not enabled. Skipping the IPv6 HTTP Proxy setup.'
)
Expand Down Expand Up @@ -2411,7 +2411,7 @@ def register_contenthost(
):
"""Satellite Registration to CDN"""
# Enabling proxy for IPv6
if enable_proxy and all([settings.server.is_ipv6, settings.server.http_proxy_ipv6_url]):
if enable_proxy and settings.server.is_ipv6:
url = urlparse(settings.server.http_proxy_ipv6_url)
self.enable_rhsm_proxy(url.hostname, url.port)
return super().register_contenthost(
Expand Down

0 comments on commit b71d12b

Please sign in to comment.