[virt-tools-list] [virt-manager PATCH 6/6] virtManager.delete: don't allow deleting SCSI disks
Pavel Hrdina
phrdina at redhat.com
Mon Mar 6 08:28:52 UTC 2017
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
virtManager/delete.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/virtManager/delete.py b/virtManager/delete.py
index 8113e140..9a08e04b 100644
--- a/virtManager/delete.py
+++ b/virtManager/delete.py
@@ -340,9 +340,11 @@ def can_delete(conn, vol, path):
if vol:
# Managed storage
- if (vol.get_parent_pool().get_type() ==
- virtinst.StoragePool.TYPE_ISCSI):
+ pool_type = vol.get_parent_pool().get_type()
+ if pool_type == virtinst.StoragePool.TYPE_ISCSI:
msg = _("Cannot delete iscsi share.")
+ elif pool_type == virtinst.StoragePool.TYPE_SCSI:
+ msg = _("Cannot delete SCSI device.")
else:
if conn.is_remote():
msg = _("Cannot delete unmanaged remote storage.")
--
2.12.0
More information about the virt-tools-list
mailing list