[virt-tools-list] [virt-manager PATCH 5/6] virtManager.clone: don't generate default clone_path for some storage pools

Pavel Hrdina phrdina at redhat.com
Mon Mar 6 08:28:51 UTC 2017


Libvirt doesn't support creating volumes for some storage pools,
don't generate default clone_path for these storage pools.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1420190

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 virtManager/clone.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/virtManager/clone.py b/virtManager/clone.py
index 0fa74e6f..89db699c 100644
--- a/virtManager/clone.py
+++ b/virtManager/clone.py
@@ -116,6 +116,14 @@ def do_we_default(conn, vol, path, ro, shared, devtype):
     elif not vol and path and not os.access(path, os.W_OK):
         info = append_str(info, _("No write access"))
 
+    pool_type = vol.get_parent_pool().get_type()
+    if pool_type == virtinst.StoragePool.TYPE_SCSI:
+        info = append_str(info, _("SCSI device"))
+    elif pool_type == virtinst.StoragePool.TYPE_DISK:
+        info = append_str(info, _("Disk device"))
+    elif pool_type == virtinst.StoragePool.TYPE_ISCSI:
+        info = append_str(info, _("iSCSI share"))
+
     if shared:
         info = append_str(info, _("Shareable"))
 
-- 
2.12.0




More information about the virt-tools-list mailing list