Skip to content

Commit

Permalink
passing ipv6 params valued for direct Host calls (SatelliteQE#15964)
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarkhatavkar authored Aug 20, 2024
1 parent 461d45c commit 636bcda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pytest_plugins/video_cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _clean_video(session_id, test):

if settings.ui.grid_url and session_id:
grid = urlparse(url=settings.ui.grid_url)
infra_grid = Host(hostname=grid.hostname)
infra_grid = Host(hostname=grid.hostname, ipv6=settings.server.is_ipv6)
infra_grid.execute(command=f'rm -rf /var/www/html/videos/{session_id}')
logger.info(f"video cleanup for session {session_id} is complete")
else:
Expand Down
6 changes: 5 additions & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def __init__(self, hostname, auth=None, **kwargs):
# key file based authentication
kwargs.update({'key_filename': auth})
self._satellite = kwargs.get('satellite')
self.ipv6 = kwargs.get('ipv6', settings.server.is_ipv6)
self.blank = kwargs.get('blank', False)
super().__init__(hostname=hostname, **kwargs)

Expand Down Expand Up @@ -990,7 +991,7 @@ def configure_puppet(self, proxy_hostname=None, run_puppet_agent=True):
# sat6 under the capsule --> certifcates or on capsule via cli "puppetserver
# ca list", so that we sign it.
self.execute('/opt/puppetlabs/bin/puppet agent -t')
proxy_host = Host(hostname=proxy_hostname)
proxy_host = Host(hostname=proxy_hostname, ipv6=settings.server.is_ipv6)
proxy_host.execute(f'puppetserver ca sign --certname {cert_name}')

if run_puppet_agent:
Expand Down Expand Up @@ -2393,6 +2394,7 @@ class SSOHost(Host):
def __init__(self, sat_obj, **kwargs):
self.satellite = sat_obj
kwargs['hostname'] = kwargs.get('hostname', settings.rhsso.host_name)
kwargs['ipv6'] = kwargs.get('ipv6', settings.server.is_ipv6)
super().__init__(**kwargs)

def get_rhsso_client_id(self):
Expand Down Expand Up @@ -2564,6 +2566,7 @@ class IPAHost(Host):
def __init__(self, sat_obj, **kwargs):
self.satellite = sat_obj
kwargs['hostname'] = kwargs.get('hostname', settings.ipa.hostname)
kwargs['ipv6'] = kwargs.get('ipv6', settings.server.is_ipv6)
# Allow the class to be constructed from kwargs
kwargs['from_dict'] = True
kwargs.update(
Expand Down Expand Up @@ -2665,6 +2668,7 @@ def __init__(self, url, **kwargs):
self._conf_dir = '/etc/squid/'
self._access_log = '/var/log/squid/access.log'
kwargs['hostname'] = urlparse(url).hostname
kwargs['ipv6'] = kwargs.get('ipv6', settings.server.is_ipv6)
super().__init__(**kwargs)

def add_user(self, name, passwd):
Expand Down

0 comments on commit 636bcda

Please sign in to comment.