unattended: Always set "media" as install-source for ISOs

Let's set "media" as installation source for all the ISOs, even the
net-installer ones, as this can be dealt with on osinfo-db side.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2019-07-12 15:02:23 +02:00 committed by Cole Robinson
parent e775dd09f6
commit e5980863dd
2 changed files with 1 additions and 5 deletions

View File

@ -13,7 +13,7 @@
<type arch="x86_64" machine="q35">hvm</type>
<kernel>/VIRTINST-TESTSUITE/vmlinuz</kernel>
<initrd>/VIRTINST-TESTSUITE/initrd.img</initrd>
<cmdline>ks=file:/fedora.ks inst.repo=</cmdline>
<cmdline>ks=file:/fedora.ks</cmdline>
</os>
<features>
<acpi/>

View File

@ -315,12 +315,8 @@ def _lookup_rawscript(osinfo, profile, os_media):
def prepare_install_script(guest, unattended_data,
url, os_media, injection_method):
def _get_installation_source(os_media):
# This is ugly, but that's only the current way to deal with
# netinstall medias.
if not os_media:
return "network"
if os_media.is_netinst():
return "network"
return "media"
rawscript = _lookup_rawscript(guest.osinfo,