[virt-manager PATCH v2 22/25] installertremeedia: Add an internel _media to the object

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

 



Let's add an internal Libosinfo.OsMedia attribute to the
InstallerTreeMedia object.

By doing this, it'll help us in the future to:
- easily get the media's kernel/initrd path
- pass down the media to the generate_install_script()

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 virtinst/installertreemedia.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtinst/installertreemedia.py b/virtinst/installertreemedia.py
index 2484e88c..2988c198 100644
--- a/virtinst/installertreemedia.py
+++ b/virtinst/installertreemedia.py
@@ -80,6 +80,8 @@ class InstallerTreeMedia(object):
         self._tmpfiles = []
         self._tmpvols = []
 
+        # A Libosinfo.OsinfoMedia
+        self._media = None
         self._unattended_data = None
 
         self._media_type = MEDIA_ISO
@@ -96,6 +98,9 @@ class InstallerTreeMedia(object):
 
         if self._media_type == MEDIA_ISO:
             InstallerTreeMedia.validate_path(self.conn, self.location)
+            osguess = OSDB.guess_os_by_iso(self.location)
+            if osguess:
+                self._media = osguess[1]
 
 
     ########################
-- 
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