storage/callback: add the backend_class property
This should be useful for devs to inspect the Callback* classes.
This commit is contained in:
parent
527fa1ec20
commit
409ea88a66
@ -338,6 +338,13 @@ class CallbackPool(qubes.storage.Pool):
|
||||
if line == 'SIGNAL_setup':
|
||||
raise UnhandledSignalException(self, line)
|
||||
|
||||
@property
|
||||
def backend_class(self):
|
||||
'''Class of the first non-CallbackPool backend Pool.'''
|
||||
if isinstance(self._cb_impl, CallbackPool):
|
||||
return self._cb_impl.backend_class
|
||||
return self._cb_impl.__class__
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
return {
|
||||
@ -468,6 +475,13 @@ class CallbackVolume(qubes.storage.Volume):
|
||||
vol_args = [self.name, self.vid, self.source, *cb_args]
|
||||
yield from self._cb_pool._callback(cb, cb_args=vol_args, **kwargs) # pylint: disable=protected-access
|
||||
|
||||
@property
|
||||
def backend_class(self):
|
||||
'''Class of the first non-CallbackVolume backend Volume.'''
|
||||
if isinstance(self._cb_impl, CallbackVolume):
|
||||
return self._cb_impl.backend_class
|
||||
return self._cb_impl.__class__
|
||||
|
||||
@asyncio.coroutine
|
||||
def create(self):
|
||||
yield from self._assert_initialized()
|
||||
|
Loading…
Reference in New Issue
Block a user