Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pytest_fixtures/core/contenthosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ def host_conf(request):
conf = params = {}
if hasattr(request, 'param'):
params = request.param
elif hasattr(request, 'get'):
params = request.get('param', {})
distro = params.get('distro', 'rhel')
network = params.get('network', settings.content_host.network_type)
_rhelver = f"{distro}{params.get('rhel_version', settings.content_host.default_rhel_version)}"

# check to see if no-containers is passed as an argument to pytest
deploy_kwargs = {}
if not any(
[
request.config.getoption('no_containers'),
params.get('no_containers'),
request.node.get_closest_marker('no_containers'),
]
if not (
params.get('no_containers')
or request.config.getoption('no_containers')
or request.node.get_closest_marker('no_containers')
):
deploy_kwargs = settings.content_host.get(_rhelver).to_dict().get('container', {})
if deploy_kwargs and network:
Expand Down