diff options
author | Cole Robinson <crobinso@redhat.com> | 2014-12-10 09:04:09 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2014-12-10 09:04:29 -0500 |
commit | 12340a3858f468d160c3e6917507e856fb1b7282 (patch) | |
tree | c50c94f30ef9a0ebcd381dbfdc96c5f3e35a84d6 /virtinst/devicedisk.py | |
parent | 2890d70a799b7b24eb99c836e1a91db776c034af (diff) | |
download | virt-manager-12340a3858f468d160c3e6917507e856fb1b7282.tar.gz |
diskbackend: Try looking up network volumes by path
For gluster volumes, which have unique URLs for volume paths, this
makes selecting network volumes via the storagebrowser UI work.
Sheepdog and RBD volumes don't work yet
Diffstat (limited to 'virtinst/devicedisk.py')
-rw-r--r-- | virtinst/devicedisk.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py index e047c64f..77200d60 100644 --- a/virtinst/devicedisk.py +++ b/virtinst/devicedisk.py @@ -524,13 +524,9 @@ class VirtualDisk(VirtualDevice): raise ValueError("Can't change disk path if storage creation info " "has been set.") - parent_pool = None - vol_object = None - if newpath: - # User explicitly changed 'path', so try to lookup its storage - # object since we may need it - (vol_object, parent_pool) = diskbackend.manage_path( - self.conn, newpath) + # User explicitly changed 'path', so try to lookup its storage + # object since we may need it + (vol_object, parent_pool) = diskbackend.manage_path(self.conn, newpath) self._change_backend(newpath, vol_object, parent_pool) self._set_xmlpath(self.path) |