[virt-manager PATCH v3 4/9] installertreemedia: Pass media down to prepare_install_script()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let's pass the media down to prepare_install_script() as it'll be used
to:
- select the preferred installation source;
- be passed down to the get_install_script() method;

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/installertreemedia.py | 2 +-
 virtinst/unattended.py         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtinst/installertreemedia.py b/virtinst/installertreemedia.py
index 0b8b1383..86792503 100644
--- a/virtinst/installertreemedia.py
+++ b/virtinst/installertreemedia.py
@@ -189,7 +189,7 @@ class InstallerTreeMedia(object):
         if self._unattended_data:
             location = self.location if self._media_type == MEDIA_URL else None
             script = unattended.prepare_install_script(
-                    guest, self._unattended_data, location)
+                    guest, self._unattended_data, location, self._media)
             path, cmdline = unattended.generate_install_script(script)
 
             logging.debug("Generated unattended cmdline: %s", cmdline)
diff --git a/virtinst/unattended.py b/virtinst/unattended.py
index 6d67b210..ebfaae8a 100644
--- a/virtinst/unattended.py
+++ b/virtinst/unattended.py
@@ -228,7 +228,7 @@ class UnattendedData():
     user_password = None
 
 
-def prepare_install_script(guest, unattended_data, url=None):
+def prepare_install_script(guest, unattended_data, url=None, media=None):
     rawscript = guest.osinfo.get_install_script(unattended_data.profile)
     script = OSInstallScript(rawscript, guest.osinfo)
 
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux