mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
virtManager.delete: don't allow deleting SCSI disks
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
31e923dbdf
commit
8225cac648
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user