Skip to content

Commit

Permalink
Configure proxy support for create_custom_repos function
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Ganar <[email protected]>
  • Loading branch information
shubhamsg199 committed Dec 10, 2024
1 parent 2a06c9d commit 3d28fa5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,11 +560,14 @@ def create_custom_repos(self, **kwargs):
name=custom_repo
baseurl=http://repourl.domain.com/path
enabled=1
gpgcheck=0
gpgcheck=0pr
"""
for name, url in kwargs.items():
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0'
content = f'[{name}]\n' f'name={name}\n' f'baseurl={url}\n' 'enabled=1\n' 'gpgcheck=0\n'
# Add proxy configuration for IPv6
if settings.server.is_ipv6:
content += f'proxy={settings.http_proxy.http_proxy_ipv6_url}'
self.execute(f'echo "{content}" > /etc/yum.repos.d/{name}.repo')

def get_base_url_for_older_rhel_minor(self):
Expand Down

0 comments on commit 3d28fa5

Please sign in to comment.