Reflect controllers <-> disks mapping relationship for not only scsi,
But other storage controllers.

As a bonus, These controllers are not allowed to be removed if there are
disks attached to them.

Signed-off-by: Lin Ma <l...@suse.com>
---
 virtManager/details.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index 145101c2..4b145602 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -3025,7 +3025,7 @@ class vmmDetails(vmmGObjectUI):
             can_remove = False
         if controller.type == "pci":
             can_remove = False
-        if controller.type == "scsi":
+        elif controller.type in ["scsi", "sata", "ide", "fdc"]:
             model = self.widget("controller-device-list").get_model()
             model.clear()
             for disk in _calculate_disk_bus_index(self.vm.xmlobj.devices.disk):
-- 
2.16.2

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

Reply via email to