osdict: Drop post_install driver bits

osinfo library doesn't return data for these with the fedora 32
version, so it's hard to get coverage testing. Since we aren't
even using this code yet anyways, let's remove it until it is needed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2020-07-17 19:48:03 -04:00
parent 2170efc9a5
commit 25b3113ba9
2 changed files with 2 additions and 34 deletions

View File

@ -112,13 +112,3 @@ class TestOSDB(unittest.TestCase):
self.assertTrue(win7.supports_unattended_drivers("x86_64"))
self.assertFalse(win7.supports_unattended_drivers("fakearch"))
self.assertTrue(win7.get_pre_installable_drivers_location("x86_64"))
self.assertFalse(
OSDB.lookup_os("fedora10").supports_unattended_agents("x86_64"))
# Just call this for code coverage. Values differ by osinfo-db version
win7.get_post_installable_drivers_location("x86_64")
win10 = OSDB.lookup_os("win10")
win10.get_post_installable_drivers_location("x86_64")
win10.supports_unattended_agents("x86_64")

View File

@ -699,22 +699,10 @@ class _OsVariant(object):
def _get_pre_installable_drivers(self, arch):
installable_drivers = self._get_installable_drivers(arch)
pre_inst_drivers = []
for driver in installable_drivers:
if not driver.get_pre_installable():
continue
pre_inst_drivers.append(driver)
return pre_inst_drivers
def _get_post_installable_drivers(self, arch):
installable_drivers = self._get_installable_drivers(arch)
post_inst_drivers = []
for driver in installable_drivers:
if driver.get_pre_installable():
continue
post_inst_drivers.append(driver)
return post_inst_drivers
pre_inst_drivers.append(driver)
return pre_inst_drivers
def _get_drivers_location(self, drivers):
locations = []
@ -730,11 +718,6 @@ class _OsVariant(object):
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)
def get_pre_installable_devices(self, arch):
drivers = self._get_pre_installable_drivers(arch)
devices = []
@ -747,11 +730,6 @@ class _OsVariant(object):
return True
return False
def supports_unattended_agents(self, arch):
if self._get_post_installable_drivers(arch):
return True
return False
class _OsMedia(object):
def __init__(self, osinfo_media):