[virt-manager PATCH 6/6] virtManager.delete: don't allow deleting SCSI disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux