Change in vdsm[master]: v2v: Intorduce OutputParser
shavivi at redhat.com
shavivi at redhat.com
Sun Apr 5 07:29:32 UTC 2015
Shahar Havivi has posted comments on this change.
Change subject: v2v: Intorduce OutputParser
......................................................................
Patch Set 3:
(3 comments)
https://gerrit.ovirt.org/#/c/39360/3//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2015-03-30 15:33:07 +0300
Line 4: Commit: Shahar Havivi <shaharh at redhat.com>
Line 5: CommitDate: 2015-04-01 12:53:17 +0300
Line 6:
Line 7: v2v: Intorduce OutputParser
> s/Intorduce/Introduce/
Done
Line 8:
Line 9: OutputParser is a parser for virt-v2v process output.
Line 10: It analyze the phases of copying disk and each copy disk progress
Line 11: and generate stream of parsing events.
https://gerrit.ovirt.org/#/c/39360/3/vdsm/v2v.py
File vdsm/v2v.py:
Line 35: DiskProgress = namedtuple('DiskProgress', ['progress'])
Line 36:
Line 37:
Line 38: class V2VError(Exception):
Line 39: ''' Base class for virt-v2v errors '''
> Sorry for missing this before - this is base class for v2v errors, not erro
Done
Line 40:
Line 41:
Line 42: class InvalidVMConfiguration(ValueError):
Line 43: ''' Unexpected error while parsing libvirt domain xml '''
Line 122: if m is None:
Line 123: raise OutputParserError('error parsing progress, chunk: %r'
Line 124: % chunk)
Line 125: try:
Line 126: progress = int(m.group(1))
> you can just return here, this will make the flow a bit clearer
Done
Line 127: except ValueError:
Line 128: raise OutputParserError('error parsing progress regex: %r'
Line 129: % m.groups)
Line 130: return progress
--
To view, visit https://gerrit.ovirt.org/39360
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I54f3d610d704d0b922e38073edcc813cbc27fe83
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list