summaryrefslogtreecommitdiff
path: root/virtinst/osdict.py
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2019-07-30 17:58:37 +0200
committerCole Robinson <crobinso@redhat.com>2019-08-06 17:59:05 -0400
commitff337843e6fad22228ee34edddce02dd8ab1e916 (patch)
tree98e146dfbf4100d32f50738d6ab5b730afaf211c /virtinst/osdict.py
parent8ab2e49e364aea113bd90a409a7894ad18efe525 (diff)
downloadvirt-manager-ff337843e6fad22228ee34edddce02dd8ab1e916.tar.gz
osdict: Add get_{pre,post}_installable_drivers_location()
Let's add two new methods to get the pre & post installable drivers' location, returning a list of URLs (strings). Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'virtinst/osdict.py')
-rw-r--r--virtinst/osdict.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 0584c655..73522d86 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -679,6 +679,25 @@ class _OsVariant(object):
post_inst_drivers.append(driver)
return post_inst_drivers
+ def _get_drivers_location(self, drivers):
+ locations = []
+ for driver in drivers:
+ filenames = driver.get_files()
+ for filename in filenames:
+ location = os.path.join(driver.get_location(), filename)
+ locations.append(location)
+ return locations
+
+ def get_pre_installable_drivers_location(self, arch):
+ pre_inst_drivers = self._get_pre_installable_drivers(arch)
+
+ return self._get_drivers_location(pre_inst_drivers)
+
+ def get_post_installable_drivers_location(self, arch):
+ post_inst_drivers = self._get_post_installable_drivers(arch)
+
+ return self._get_drivers_location(post_inst_drivers)
+
class _OsMedia(object):
def __init__(self, osinfo_media):