storage: add size and usage properties
It's already available in config dict, but lets provide uniform API. And also it's a bit weird to look for usage data in configuration... QubesOS/qubes-issues#3240
This commit is contained in:
parent
3d4f626515
commit
7211c7daff
@ -271,6 +271,16 @@ class Pool(object):
|
||||
l.split('=', 1) for l in pool_info_data.splitlines())
|
||||
return self._config
|
||||
|
||||
@property
|
||||
def size(self):
|
||||
''' Storage pool size, in bytes'''
|
||||
return self.config['size']
|
||||
|
||||
@property
|
||||
def usage(self):
|
||||
''' Space used in the pool, in bytes '''
|
||||
return self.config['usage']
|
||||
|
||||
@property
|
||||
def driver(self):
|
||||
''' Storage pool driver '''
|
||||
|
Loading…
Reference in New Issue
Block a user