qubes.storage.domain use new storage API
This commit is contained in:
parent
d1c606b952
commit
f60ccb235d
@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
''' Manages block devices in a domain '''
|
''' Manages block devices in a domain '''
|
||||||
|
|
||||||
import string
|
import string # pylint: disable=deprecated-module
|
||||||
|
|
||||||
from qubes.storage import Pool, Volume
|
from qubes.storage import Pool, Volume
|
||||||
|
|
||||||
@ -99,15 +99,12 @@ class DomainPool(Pool):
|
|||||||
class DomainVolume(Volume):
|
class DomainVolume(Volume):
|
||||||
''' A volume provided by a block device in an domain '''
|
''' A volume provided by a block device in an domain '''
|
||||||
|
|
||||||
def __init__(self, name, pool, desc, mode, size):
|
def __init__(self, name, pool, desc, mode, **kwargs):
|
||||||
if mode == 'w':
|
rw = (mode == 'w')
|
||||||
volume_type = 'read-write'
|
|
||||||
else:
|
|
||||||
volume_type = 'read-only'
|
|
||||||
|
|
||||||
super(DomainVolume, self).__init__(desc,
|
super(DomainVolume, self).__init__(desc, pool, vid=name, removable=True,
|
||||||
pool,
|
rw=rw, **kwargs)
|
||||||
volume_type,
|
|
||||||
vid=name,
|
@property
|
||||||
size=size,
|
def revisions(self):
|
||||||
removable=True)
|
return {}
|
||||||
|
Loading…
Reference in New Issue
Block a user