Skip to content

Commit

Permalink
Add IPv6 support in Centos/Oracle Host checkout (#17367)
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta83 authored Feb 24, 2025
1 parent fdce08a commit 7699be0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pytest_fixtures/core/contenthosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ def centos_host(request, version):
"distro": "centos",
"no_containers": True,
}
with Broker(**host_conf(request), host_class=ContentHost) as host:
with Broker(
**host_conf(request),
host_class=ContentHost,
deploy_network_type='ipv6' if settings.server.is_ipv6 else 'ipv4',
) as host:
yield host


Expand All @@ -258,7 +262,11 @@ def oracle_host(request, version):
"distro": "oracle",
"no_containers": True,
}
with Broker(**host_conf(request), host_class=ContentHost) as host:
with Broker(
**host_conf(request),
host_class=ContentHost,
deploy_network_type='ipv6' if settings.server.is_ipv6 else 'ipv4',
) as host:
yield host


Expand Down
2 changes: 2 additions & 0 deletions tests/foreman/api/test_convert2rhel.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def centos(
):
"""Deploy and register Centos host"""
major = version.split('.')[0]
centos_host.enable_ipv6_dnf_proxy()
assert centos_host.execute('yum -y update').status == 0
repo_url = settings.repos.convert2rhel.convert_to_rhel_repo.format(major)
repo = create_repo(module_target_sat, module_els_sca_manifest_org, repo_url)
Expand Down Expand Up @@ -171,6 +172,7 @@ def oracle(
):
"""Deploy and register Oracle host"""
major = version.split('.')[0]
oracle_host.enable_ipv6_dnf_proxy()
# disable rhn-client-tools because it obsoletes the subscription manager package
oracle_host.execute('echo "exclude=rhn-client-tools" >> /etc/yum.conf')
# Install and set correct RHEL compatible kernel and using non-UEK kernel, based on C2R docs
Expand Down

0 comments on commit 7699be0

Please sign in to comment.