mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
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>
This commit is contained in:
parent
8ab2e49e36
commit
ff337843e6
@ -679,6 +679,25 @@ class _OsVariant(object):
|
|||||||
post_inst_drivers.append(driver)
|
post_inst_drivers.append(driver)
|
||||||
return post_inst_drivers
|
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):
|
class _OsMedia(object):
|
||||||
def __init__(self, osinfo_media):
|
def __init__(self, osinfo_media):
|
||||||
|
Loading…
Reference in New Issue
Block a user