On Sat, Mar 02, 2019 at 07:01:35PM -0500, Cole Robinson wrote: > On 3/1/19 6:18 AM, Pavel Hrdina wrote: > > When cloning a guest in virt-manager the GUI shows a list of disks and > > select default cloning policy for every disk. For storage pools where > > we know that cloning is not possible we should not select that option > > as default one. > > > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1463066 > > > > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> > > --- > > virtManager/clone.py | 11 ++++++----- > > virtManager/storagepool.py | 4 ++-- > > virtinst/storage.py | 24 ++++++++++++++++++------ > > 3 files changed, 26 insertions(+), 13 deletions(-) > > > > diff --git a/virtManager/clone.py b/virtManager/clone.py > > index 895d258a..cd991f6b 100644 > > --- a/virtManager/clone.py > > +++ b/virtManager/clone.py > > @@ -64,6 +64,11 @@ def can_we_clone(conn, vol, path): > > elif not os.path.exists(path): > > msg = _("Path does not exist.") > > > > + else: > > + pool = vol.get_parent_pool() > > + if not pool.supports_volume_creation(clone=True): > > + msg = _("Cannot clone {} storage pool.".format(pool.get_type())) > > + > > Ugh I know this is what the python world is pushing these days but I > personally find that format to be ugly and far less readable. Please use > the traditional format for this patch. If you feel strongly about using > that format in the code base let's have a top level thread about it. OK, I'll change the formatting back to the old style before pushing. > Otherwise: > > Reviewed-by: Cole Robinson <crobinso@xxxxxxxxxx> Thanks, Pavel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list