qubes/storage: allow passing just volume name to storage.resize
It makes much more sense to call: vm.storage.resize('private', 10000000000) instead of: vm.storage.resize(vm.volumes['private'], 10000000000)
This commit is contained in:
parent
d8286b6dab
commit
6e383c703d
@ -306,6 +306,8 @@ class Storage(object):
|
|||||||
|
|
||||||
def resize(self, volume, size):
|
def resize(self, volume, size):
|
||||||
''' Resizes volume a read-writable volume '''
|
''' Resizes volume a read-writable volume '''
|
||||||
|
if isinstance(volume, basestring):
|
||||||
|
volume = self.vm.volumes[volume]
|
||||||
self.get_pool(volume).resize(volume, size)
|
self.get_pool(volume).resize(volume, size)
|
||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user