mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-09 23:15:46 -06:00
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:
parent
72058f2bbf
commit
a9a085340b
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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."))
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user