[virt-tools-list] [virt-manager PATCH v3 2/9] installertremeedia: Add an internal Libosinfo.Media attribute
Fabiano Fidêncio
fidencio at redhat.com
Thu Mar 7 12:52:51 UTC 2019
Let's add an internal Libosinfo.OsMedia attribute to the
InstallerTreeMedia object.
By doing this, it'll help us to:
- easily get the media's kernel and initrd path
- pass down the Libosinfo.Media to the generate_install_script() method
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
virtinst/installertreemedia.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/virtinst/installertreemedia.py b/virtinst/installertreemedia.py
index ab2f67eb..39f5ac0f 100644
--- a/virtinst/installertreemedia.py
+++ b/virtinst/installertreemedia.py
@@ -81,6 +81,7 @@ class InstallerTreeMedia(object):
self._tmpvols = []
self._unattended_data = None
+ self._media = None
self._media_type = MEDIA_ISO
if (not self.conn.is_remote() and
@@ -96,6 +97,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
More information about the virt-tools-list
mailing list