mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 01:55:20 +03:00
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:
parent
0a3dcdd1b9
commit
6aa18520c6
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user