mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06: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:
|
if vol:
|
||||||
# Managed storage
|
# Managed storage
|
||||||
if (vol.get_parent_pool().get_type() ==
|
pool_type = vol.get_parent_pool().get_type()
|
||||||
virtinst.StoragePool.TYPE_ISCSI):
|
if pool_type == virtinst.StoragePool.TYPE_ISCSI:
|
||||||
msg = _("Cannot delete iscsi share.")
|
msg = _("Cannot delete iscsi share.")
|
||||||
|
elif pool_type == virtinst.StoragePool.TYPE_SCSI:
|
||||||
|
msg = _("Cannot delete SCSI device.")
|
||||||
else:
|
else:
|
||||||
if conn.is_remote():
|
if conn.is_remote():
|
||||||
msg = _("Cannot delete unmanaged remote storage.")
|
msg = _("Cannot delete unmanaged remote storage.")
|
||||||
|
Loading…
Reference in New Issue
Block a user