Adam Litke has posted comments on this change. Change subject: storage: add support for blkdiscard command ......................................................................
Patch Set 6: (2 comments) https://gerrit.ovirt.org/#/c/35629/6/lib/vdsm/storage/blkdiscard.py File lib/vdsm/storage/blkdiscard.py: Line 43: def run_blkdiscard(device): Line 44: cmd = [_blkdiscard.cmd] Line 45: cmd.append(device) Line 46: Line 47: rc, out, err = commands.execCmd(cmd, deathSignal=signal.SIGKILL) This module seems like a perfect candidate for StorageJob integration. From the blkdiscard man page I see that we can get progress info which can be reported via the Jobs API. Line 48: Line 49: if rc != 0: https://gerrit.ovirt.org/#/c/35629/6/tests/storage_blkdiscard_test.py File tests/storage_blkdiscard_test.py: Line 25: Line 26: BLKDISCARD = blkdiscard._blkdiscard.cmd Line 27: Line 28: Line 29: class FakeCmd(object): This class looks like a general purpose utility that should appear in testlib.py. Line 30: Line 31: def __init__(self, name, *calls): Line 32: self.patch = monkeypatch.Patch([(commands, name, self)]) Line 33: self.calls = list(calls) -- To view, visit https://gerrit.ovirt.org/35629 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2ea7dd19fadc600b8fe78fb436ae430d35f52165 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Ala Hino <ah...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com> Gerrit-Reviewer: Idan Shaby <ish...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Yaniv Kaul <yk...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches