Skip to content

Commit

Permalink
unattended_install: Remove the hack to get ks from providers
Browse files Browse the repository at this point in the history
This hack was added in a144934 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 <[email protected]>
  • Loading branch information
ldoktor committed Mar 31, 2017
1 parent 8355da4 commit 8951ace
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions virttest/tests/unattended_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 8951ace

Please sign in to comment.