[virt-manager PATCH 2/2] virt-manager, details: fix path and size for disk type='volume'

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

 



Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1146869

Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 virtManager/details.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index b27e62b..3d83193 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -2559,6 +2559,7 @@ class vmmDetails(vmmGObjectUI):
             return
 
         path = disk.path
+        source_pool = disk.sourcePool
         devtype = disk.device
         ro = disk.read_only
         share = disk.shareable
@@ -2584,7 +2585,13 @@ class vmmDetails(vmmGObjectUI):
         if not path:
             size = "-"
         else:
-            vol = self.conn.get_vol_by_path(path)
+            if source_pool:
+                pool = self.conn.get_pool(source_pool)
+                if pool:
+                    vol = pool.get_volume(path)
+            else:
+                vol = self.conn.get_vol_by_path(path)
+
             if vol:
                 size = vol.get_pretty_capacity()
             elif not self.conn.is_remote():
-- 
1.9.3

_______________________________________________
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