From 8ef88419c28cdcad039cc665e6c292a43433d31f Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Mon, 17 Jun 2024 05:28:37 -0400 Subject: [PATCH] [6.15.z] Fix validation: validate IPv6 proxy URL only when IS_IPV6 is set to True (#15423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix validation: validate IPv6 proxy URL only when IS_IPV6 is set to True (#15413) (cherry picked from commit 90ffb9b671af4a9ae74fedb4f2468df05f4d024f) Co-authored-by: Ondřej Gajdušek --- robottelo/config/validators.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/robottelo/config/validators.py b/robottelo/config/validators.py index 1c37d63404f..2ae4c42ac04 100644 --- a/robottelo/config/validators.py +++ b/robottelo/config/validators.py @@ -36,7 +36,12 @@ Validator('server.ssh_password', default=None), Validator('server.verify_ca', default=False), Validator('server.is_ipv6', is_type_of=bool, default=False), - Validator('server.http_proxy_ipv6_url', is_type_of=str, default=None), + # validate http_proxy_ipv6_url only if is_ipv6 is True + Validator( + 'server.http_proxy_ipv6_url', + is_type_of=str, + when=Validator('server.is_ipv6', eq=True), + ), ], content_host=[ Validator('content_host.default_rhel_version', must_exist=True),