osdict: Add supports_unattended_drivers()

Let's add a method which tells us whether pre & post installable drivers
are supported when performing unattended installations.

This is going to help us in the future in order to force virtio-win
usage when unattended installing guests which support it.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2019-08-02 17:10:20 +02:00 committed by Cole Robinson
parent ff337843e6
commit 7bc40eeed1

View File

@ -698,6 +698,12 @@ class _OsVariant(object):
return self._get_drivers_location(post_inst_drivers)
def supports_unattended_drivers(self, arch):
if (self._get_pre_installable_drivers(arch) and
self._get_post_installable_drivers(arch)):
return True
return False
class _OsMedia(object):
def __init__(self, osinfo_media):