From 8951ace07dd65681012b5399b963c8a81ef0b758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Fri, 31 Mar 2017 08:15:35 +0200 Subject: [PATCH] unattended_install: Remove the hack to get ks from providers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This hack was added in a1449342bc649af28e057044e8b32e929c1d48da to allow spice team to override the stock kickstart files, but it is actually a backdoor which picks the first matching file from any provider, no matter which provider is actually being used. Let's disallow this behavior and ask people to submit their files to the main repository. Signed-off-by: Lukáš Doktor --- virttest/tests/unattended_install.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/virttest/tests/unattended_install.py b/virttest/tests/unattended_install.py index af1f3569288..c9a78e1b340 100644 --- a/virttest/tests/unattended_install.py +++ b/virttest/tests/unattended_install.py @@ -176,32 +176,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'):