mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-16 18:25:02 -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:
|
elif vol:
|
||||||
# Managed storage
|
# Managed storage
|
||||||
if not conn.check_pool_support(conn,
|
if not conn.check_pool_support(
|
||||||
conn.SUPPORT_STORAGE_CREATEVOLFROM):
|
vol.storagePoolLookupByVolume(),
|
||||||
|
conn.SUPPORT_POOL_CREATEVOLFROM):
|
||||||
if conn.is_remote() or not os.access(path, os.R_OK):
|
if conn.is_remote() or not os.access(path, os.R_OK):
|
||||||
msg = _("Connection does not support managed storage cloning.")
|
msg = _("Connection does not support managed storage cloning.")
|
||||||
else:
|
else:
|
||||||
|
@ -114,7 +114,7 @@ class vmmStoragePool(vmmLibvirtObject):
|
|||||||
if self._support_isactive is None:
|
if self._support_isactive is None:
|
||||||
self._support_isactive = self.conn.check_pool_support(
|
self._support_isactive = self.conn.check_pool_support(
|
||||||
self._backend,
|
self._backend,
|
||||||
self.conn.SUPPORT_STORAGE_ISACTIVE)
|
self.conn.SUPPORT_POOL_ISACTIVE)
|
||||||
|
|
||||||
if not self._support_isactive:
|
if not self._support_isactive:
|
||||||
return True
|
return True
|
||||||
|
@ -559,8 +559,8 @@ class StorageVolume(_StorageObject):
|
|||||||
if not isinstance(vol, libvirt.virStorageVol):
|
if not isinstance(vol, libvirt.virStorageVol):
|
||||||
raise ValueError(_("input_vol must be a virStorageVol"))
|
raise ValueError(_("input_vol must be a virStorageVol"))
|
||||||
|
|
||||||
if not self.conn.check_pool_support(self.conn,
|
if not self.conn.check_pool_support(self.pool,
|
||||||
self.conn.SUPPORT_STORAGE_CREATEVOLFROM):
|
self.conn.SUPPORT_POOL_CREATEVOLFROM):
|
||||||
raise ValueError(_("Creating storage from an existing volume is"
|
raise ValueError(_("Creating storage from an existing volume is"
|
||||||
" not supported by this libvirt version."))
|
" not supported by this libvirt version."))
|
||||||
|
|
||||||
|
@ -349,10 +349,9 @@ SUPPORT_DOMAIN_GET_METADATA = _make(function="virDomain.metadata",
|
|||||||
|
|
||||||
|
|
||||||
# Pool checks
|
# Pool checks
|
||||||
# This can't ever require a pool object for back compat reasons
|
SUPPORT_POOL_CREATEVOLFROM = _make(function="virStoragePool.createXMLFrom",
|
||||||
SUPPORT_STORAGE_CREATEVOLFROM = _make(function="virStoragePool.createXMLFrom",
|
|
||||||
version=6004)
|
version=6004)
|
||||||
SUPPORT_STORAGE_ISACTIVE = _make(function="virStoragePool.isActive", args=())
|
SUPPORT_POOL_ISACTIVE = _make(function="virStoragePool.isActive", args=())
|
||||||
|
|
||||||
|
|
||||||
# Interface checks
|
# Interface checks
|
||||||
|
Loading…
Reference in New Issue
Block a user