[PATCH v2 6/6] details: Show attached disk information in scsi controller page

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

 



It helps users to recognize controllers <-> disks mapping relationship.

Signed-off-by: Lin Ma <lma@xxxxxxxx>
---
 virtManager/details.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index f284690e..4bc84570 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -3014,10 +3014,17 @@ class vmmDetails(vmmGObjectUI):
         if controller.type == "pci":
             can_remove = False
         if controller.type == "scsi":
+            model = self.widget("controller-device-list").get_model()
+            model.clear()
             for disk in self.vm.get_disk_devices():
                 if disk.address.compare_controller(controller, disk.bus):
                     can_remove = False
-                    break
+                    name = _label_for_device(disk)
+                    infoStr = ("%s on %s" % (name, disk.address.pretty_desc()))
+                    model.append([infoStr])
+            uiutil.set_grid_row_visible(self.widget("device-list-label"), True)
+            uiutil.set_grid_row_visible(self.widget("controller-device-box"), True)
+
         self.widget("config-remove").set_sensitive(can_remove)
 
         type_label = controller.pretty_desc()
-- 
2.14.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