Skip to content

Commit

Permalink
use server deploy args
Browse files Browse the repository at this point in the history
  • Loading branch information
rmynar committed Dec 2, 2024
1 parent 639d868 commit b4e8587
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pytest_fixtures/core/sat_cap_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def parametrized_enrolled_sat(
def get_deploy_args(request):
"""Get deploy arguments for Satellite base OS deployment. Should not be used for Capsule."""
rhel_version = get_sat_rhel_version()
deploy_args = settings.content_host[f'rhel{rhel_version.major}'].vm | {
deploy_args = settings.server.deploy_arguments | {
'deploy_rhel_version': rhel_version.base_version,
'deploy_network_type': 'ipv6' if settings.server.is_ipv6 else 'ipv4',
'deploy_flavor': settings.flavors.default,
Expand All @@ -306,7 +306,16 @@ def get_deploy_args(request):
deploy_args.update(request.param)
else:
deploy_args['deploy_rhel_version'] = request.param
return deploy_args
return _remove_raw_keys(deploy_args)


def _remove_raw_keys(param):
"""Recursively remove all keys that start with "raw_" which may break converting to json"""
if isinstance(param, list):
return [_remove_raw_keys(item) for item in param]
if isinstance(param, dict):
return {k: (_remove_raw_keys(param[k])) for k in param if not k.startswith("raw_")}
return param


@pytest.fixture
Expand Down

0 comments on commit b4e8587

Please sign in to comment.