Fix file storage resize

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-09-04 23:49:42 +02:00
parent d72448615d
commit d63d93b0ab
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE
2 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,12 @@ class Volume(object):
def size(self):
return self._size
@size.setter
def size(self, size):
# pylint: disable=attribute-defined-outside-init
self._size = int(size)
@property
def config(self):
''' return config data for serialization to qubes.xml '''

View File

@ -404,6 +404,12 @@ class ThinVolume(qubes.storage.Volume):
except KeyError:
return self._size
@size.setter
def size(self, _):
raise qubes.storage.StoragePoolException(
"You shouldn't use lvm size setter")
@property
def usage(self): # lvm thin usage always returns at least the same usage as
# the parent