unattended, installer: Pass _OsTree to prepare_install_script()

Later on, it'll be used to generate the install-script and the kernel
command-line based on the specific tree being used.

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-16 17:14:30 +02:00 committed by Cole Robinson
parent 0a3dcdd1b9
commit 6aa18520c6
2 changed files with 5 additions and 2 deletions

View File

@ -234,10 +234,12 @@ class Installer(object):
def _prepare_unattended_script(self, guest, meter):
url = None
os_tree = None
if self._treemedia:
if self._treemedia.is_network_url():
url = self.location
os_media = self._treemedia.get_os_media(guest, meter)
os_tree = self._treemedia.get_os_tree(guest, meter)
injection_method = "initrd"
else:
if self.conn.is_remote():
@ -252,7 +254,8 @@ class Installer(object):
injection_method = "cdrom"
return unattended.prepare_install_script(
guest, self._unattended_data, url, os_media, injection_method)
guest, self._unattended_data, url,
os_media, os_tree, injection_method)
def _prepare(self, guest, meter):
unattended_script = None

View File

@ -313,7 +313,7 @@ def _lookup_rawscript(osinfo, profile, os_media):
def prepare_install_script(guest, unattended_data,
url, os_media, injection_method):
url, os_media, os_tree, injection_method):
def _get_installation_source(os_media):
if not os_media:
return "network"