From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: [RFC] qemuimg: Replace CommandStream with Command
......................................................................
Patch Set 5:
(7 comments)
https://gerrit.ovirt.org/#/c/75009/5//COMMIT_MSG
Commit Message:
Line 7: [RFC] qemuimg: Replace CommandStream with Command
Line 8:
Line 9: Now that operation.Command supports streaming, we can use it to process
Line 10: qemu-img progress reports. This simplifies qemuimg.QemuImgOperation as
Line 11: most of the logic is already implemented in operation.Command.
what logic?
Line 12:
Line 13: This also simplify and make caller code safer, as operation.Command()
Line 14: cannot be used incorrectly, and does not need to be closed when done.
Line 15:
Line 16: Since operation.Command() raises cmdutis.Error(), qemuimg.convert() and
Line 17: qemuimg.commit() raise now cmdutils.Error() instead of
Line 18: qemuimg.QImgError(). Since callers needs an easy way to catch both
Line 19: cmdutils.Error(), and qemuimg.InvalidOutput(), qemuimg.InvalidOutput()
Line 20: inherits now from cmdutils.Error(), and qemuimg.QImgError() was removed.
this sounds big in addition to the replacement.. maybe worth be splited from this patch
(if possible.. haven't checked deeply)?
Line 21:
Line 22: Change-Id: Icb29860e7ec8ebc260f129de2066515cc3229743
https://gerrit.ovirt.org/#/c/75009/5/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:
Line 1: #
Line 2: # Copyright 2012-2016 Red Hat, Inc.
2017
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
Line 23: import logging
Line 24: import os
Line 25: import re
Line 26:
Line 27: from vdsm import cmdutils
from . import cmutils like that rest..
Line 28: from vdsm.common import exception
Line 29: from vdsm.storage import operation
Line 30:
Line 31: from . import commands
https://gerrit.ovirt.org/#/c/75009/5/tests/qemuimg_test.py
File tests/qemuimg_test.py:
Line 1: #
Line 2: # Copyright 2014 Red Hat, Inc.
2017
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
https://gerrit.ovirt.org/#/c/75009/5/tests/storage_sdm_amend_volume_test.py
File tests/storage_sdm_amend_volume_test.py:
Line 1: #
Line 2: # Copyright 2016 Red Hat, Inc.
2017
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
https://gerrit.ovirt.org/#/c/75009/5/vdsm/storage/image.py
File vdsm/storage/image.py:
Line 1: #
Line 2: # Copyright 2009-2016 Red Hat, Inc.
2017
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
--
To view, visit
https://gerrit.ovirt.org/75009
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icb29860e7ec8ebc260f129de2066515cc3229743
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Denis Chaplygin <dchaplyg(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes