support: Rename SUPPORT_STORAGE to SUPPORT_POOL

It's more accurate. And fix up comments about back compat which no
longer apply.
This commit is contained in:
Cole Robinson 2013-09-29 09:21:42 -04:00
parent 72058f2bbf
commit a9a085340b
4 changed files with 8 additions and 8 deletions

View File

@ -72,8 +72,9 @@ def can_we_clone(conn, vol, path):
elif vol:
# Managed storage
if not conn.check_pool_support(conn,
conn.SUPPORT_STORAGE_CREATEVOLFROM):
if not conn.check_pool_support(
vol.storagePoolLookupByVolume(),
conn.SUPPORT_POOL_CREATEVOLFROM):
if conn.is_remote() or not os.access(path, os.R_OK):
msg = _("Connection does not support managed storage cloning.")
else:

View File

@ -114,7 +114,7 @@ class vmmStoragePool(vmmLibvirtObject):
if self._support_isactive is None:
self._support_isactive = self.conn.check_pool_support(
self._backend,
self.conn.SUPPORT_STORAGE_ISACTIVE)
self.conn.SUPPORT_POOL_ISACTIVE)
if not self._support_isactive:
return True

View File

@ -559,8 +559,8 @@ class StorageVolume(_StorageObject):
if not isinstance(vol, libvirt.virStorageVol):
raise ValueError(_("input_vol must be a virStorageVol"))
if not self.conn.check_pool_support(self.conn,
self.conn.SUPPORT_STORAGE_CREATEVOLFROM):
if not self.conn.check_pool_support(self.pool,
self.conn.SUPPORT_POOL_CREATEVOLFROM):
raise ValueError(_("Creating storage from an existing volume is"
" not supported by this libvirt version."))

View File

@ -349,10 +349,9 @@ SUPPORT_DOMAIN_GET_METADATA = _make(function="virDomain.metadata",
# Pool checks
# This can't ever require a pool object for back compat reasons
SUPPORT_STORAGE_CREATEVOLFROM = _make(function="virStoragePool.createXMLFrom",
SUPPORT_POOL_CREATEVOLFROM = _make(function="virStoragePool.createXMLFrom",
version=6004)
SUPPORT_STORAGE_ISACTIVE = _make(function="virStoragePool.isActive", args=())
SUPPORT_POOL_ISACTIVE = _make(function="virStoragePool.isActive", args=())
# Interface checks