Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unattended_install: Remove the hack to get ks from providers #970

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 0 additions & 24 deletions virttest/tests/unattended_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from avocado.utils import download

from .. import virt_vm
from .. import asset
from .. import utils_misc
from .. import utils_disk
from .. import qemu_monitor
Expand Down Expand Up @@ -176,32 +175,9 @@ def __init__(self, test, params, vm):
self.tmpdir = test.tmpdir
self.qemu_img_binary = utils_misc.get_qemu_img_binary(params)

def get_unattended_file(backend):
providers = asset.get_test_provider_names(backend)
if not providers:
return
for provider_name in providers:
provider_info = asset.get_test_provider_info(provider_name)
if backend not in provider_info["backends"]:
continue
if "path" not in provider_info["backends"][backend]:
continue
path = provider_info["backends"][backend]["path"]
tp_unattended_file = os.path.join(path, self.unattended_file)
if os.path.exists(tp_unattended_file):
# Using unattended_file from test-provider
unattended_file = tp_unattended_file
# Take the first matched
return unattended_file

if getattr(self, 'unattended_file'):
# Fail-back to general unattended_file
unattended_file = os.path.join(test.virtdir, self.unattended_file)
for backend in asset.get_known_backends():
found_file = get_unattended_file(backend)
if found_file:
unattended_file = found_file
break
self.unattended_file = unattended_file

if params.get('use_ovmf_autounattend'):
Expand Down