Adam Litke has posted comments on this change.
Change subject: core: Expose API for qemuimg commit
......................................................................
Patch Set 12: Code-Review+2
(2 comments)
https://gerrit.ovirt.org/#/c/64222/12/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:
Line 205: cmd.append(top)
Line 206:
Line 207: # For simplicity, we always run commit in the image directory.
Line 208: workdir = os.path.dirname(top)
Line 209: return QemuImgOperation(cmd, cwd=workdir)
Have you tested that progress output is the same also for this command? If so, cool!
Line 210:
Line 211:
Line 212: class QemuImgOperation(object):
Line 213: REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*')
https://gerrit.ovirt.org/#/c/64222/12/tests/qemuimg_test.py
File tests/qemuimg_test.py:
Line 433: make_image(top, size, qemuimg.FORMAT.QCOW2, 1, "1.1",
base)
Line 434:
Line 435: op = qemuimg.commit(top, topFormat=qemuimg.FORMAT.QCOW2)
Line 436: op.wait_for_completion()
Line 437: self.assertEquals(100, op.progress)
Cool!
Line 438:
Line 439:
Line 440: def make_image(path, size, format, index, qcow2_compat, backing=None):
Line 441: qemuimg.create(path, size=size, format=format, qcow2Compat=qcow2_compat,
--
To view, visit
https://gerrit.ovirt.org/64222
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes