mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-25 23:21:45 +03:00
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:
parent
cce5827195
commit
5e8f35f5e6
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user