storage: Really don't use PREALLOC flag with test driver

Even if we are trying really hard to fake looking like qemu/kvm
This commit is contained in:
Cole Robinson 2014-12-09 12:36:09 -05:00
parent 9952764dda
commit 9f4d03d31a
2 changed files with 3 additions and 1 deletions

View File

@ -361,6 +361,8 @@ class VirtualConnection(object):
def is_qemu_session(self):
return (self.is_qemu() and self.is_session_uri())
def is_really_test(self):
return URISplit(self._open_uri).scheme.startswith("test")
def is_test(self):
return self._urisplits.scheme.startswith("test")
def is_xen(self):

View File

@ -710,7 +710,7 @@ class StorageVolume(_StorageObject):
createflags = 0
if (self.format == "qcow2" and
not self.backing_store and
not self.conn.is_test() and
not self.conn.is_really_test() and
self.conn.check_support(
self.conn.SUPPORT_POOL_METADATA_PREALLOC, self.pool)):
createflags |= libvirt.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA