storage/kernels: fix listing volumes
Pool.volumes property is implemented in a base class, individual drivers should provide list_volumes() method as a backend for that property. Fix this in a LinuxKernel pool.
This commit is contained in:
parent
263f218d40
commit
77cf310c47
@ -209,8 +209,7 @@ class LinuxKernel(Pool):
|
||||
[pool for pool in app.pools.values() if pool is not self],
|
||||
self.dir_path)
|
||||
|
||||
@property
|
||||
def volumes(self):
|
||||
def list_volumes(self):
|
||||
''' Return all known kernel volumes '''
|
||||
return [LinuxModules(self.dir_path,
|
||||
kernel_version,
|
||||
|
@ -250,7 +250,7 @@ class TC_03_KernelPool(qubes.tests.QubesTestCase):
|
||||
|
||||
def test_002_pool_volumes(self):
|
||||
""" List volumes """
|
||||
volumes = self.app.pools[self.POOL_NAME].volumes
|
||||
volumes = list(self.app.pools[self.POOL_NAME].volumes)
|
||||
self.assertEqual(len(volumes), 1)
|
||||
vol = volumes[0]
|
||||
self.assertEqual(vol.vid, 'dummy')
|
||||
|
Loading…
Reference in New Issue
Block a user