virt-manager, details: fix path and size for disk type='volume'

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2014-09-26 15:25:14 +02:00
parent cce5827195
commit 5e8f35f5e6

View File

@ -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():