mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Fix logical volume tests
After commit 590c8dbebf
, the tests got
broken due to the fact that the commit broke something that was
working. I'm changing the error to warning and fixing the tests.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
d0a76f3905
commit
212b77cc1f
@ -1,7 +1,7 @@
|
|||||||
<volume>
|
<volume>
|
||||||
<name>pool-logical-vol</name>
|
<name>pool-logical-vol</name>
|
||||||
<capacity>10737418240</capacity>
|
<capacity>10737418240</capacity>
|
||||||
<allocation>5368709120</allocation>
|
<allocation>10737418240</allocation>
|
||||||
<target>
|
<target>
|
||||||
<permissions>
|
<permissions>
|
||||||
<mode>0700</mode>
|
<mode>0700</mode>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<source>
|
<source>
|
||||||
</source>
|
</source>
|
||||||
<capacity unit="bytes">10737418240</capacity>
|
<capacity unit="bytes">10737418240</capacity>
|
||||||
<allocation unit="bytes">5368709120</allocation>
|
<allocation unit="bytes">10737418240</allocation>
|
||||||
<target>
|
<target>
|
||||||
<path>/some/target/path/pool-logical-vol</path>
|
<path>/some/target/path/pool-logical-vol</path>
|
||||||
<permissions>
|
<permissions>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<volume>
|
<volume>
|
||||||
<name>pool-logical-volinput</name>
|
<name>pool-logical-volinput</name>
|
||||||
<capacity>10737418240</capacity>
|
<capacity>10737418240</capacity>
|
||||||
<allocation>5368709120</allocation>
|
<allocation>10737418240</allocation>
|
||||||
<target>
|
<target>
|
||||||
<permissions>
|
<permissions>
|
||||||
<mode>0700</mode>
|
<mode>0700</mode>
|
||||||
|
@ -1350,8 +1350,8 @@ class LogicalVolume(StorageVolume):
|
|||||||
def __init__(self, name, capacity, pool=None, pool_name=None, conn=None,
|
def __init__(self, name, capacity, pool=None, pool_name=None, conn=None,
|
||||||
allocation=None, perms=None):
|
allocation=None, perms=None):
|
||||||
if allocation and allocation != capacity:
|
if allocation and allocation != capacity:
|
||||||
raise ValueError(_("Sparse logical volumes are not supported, "
|
logging.warn(_("Sparse logical volumes are not supported, "
|
||||||
"allocation must be equal to capacity"))
|
"setting allocation equal to capacity"))
|
||||||
StorageVolume.__init__(self, name=name, pool=pool, pool_name=pool_name,
|
StorageVolume.__init__(self, name=name, pool=pool, pool_name=pool_name,
|
||||||
allocation=capacity, capacity=capacity,
|
allocation=capacity, capacity=capacity,
|
||||||
conn=conn)
|
conn=conn)
|
||||||
@ -1365,9 +1365,9 @@ class LogicalVolume(StorageVolume):
|
|||||||
|
|
||||||
def set_allocation(self, allocation):
|
def set_allocation(self, allocation):
|
||||||
if allocation != self.capacity:
|
if allocation != self.capacity:
|
||||||
raise ValueError(_("Sparse logical volumes are not supported, "
|
logging.warn(_("Sparse logical volumes are not supported, "
|
||||||
"allocation must be equal to capacity"))
|
"setting allocation equal to capacity"))
|
||||||
super(LogicalVolume, self).set_allocation(allocation)
|
super(LogicalVolume, self).set_allocation(self.capacity)
|
||||||
capacity = property(StorageVolume.get_allocation, set_allocation)
|
capacity = property(StorageVolume.get_allocation, set_allocation)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user