Change in vdsm[master]: v2v: add fake virt-v2v process for testing without virt-v2v

shavivi at redhat.com shavivi at redhat.com
Wed Oct 28 08:23:16 UTC 2015


Shahar Havivi has posted comments on this change.

Change subject: v2v: add fake virt-v2v process for testing without virt-v2v
......................................................................


Patch Set 2:

(5 comments)

https://gerrit.ovirt.org/#/c/47738/2/tests/fake-virt-v2v.py
File tests/fake-virt-v2v.py:

Line 26: parser.add_option('--os', dest='outputStorage',
Line 27:                   help='Output directory for the images')
Line 28: parser.add_option('--machine-readable', dest='machineReadable',
Line 29:                   help='Set the terminal output to be readable')
Line 30: 
> I don't think optparse support this non-standard argument style. Maybe argp
oCaml will be hard to maintain and will add another layer (oCaml compile) to the build.
getopt is not taking short option more then one character.
we can either stay with the long options or we can parse the argv...
Line 31: (opt, args) = parser.parse_args()
Line 32: 
Line 33: 
Line 34: def write_output(msg):


Line 27:                   help='Output directory for the images')
Line 28: parser.add_option('--machine-readable', dest='machineReadable',
Line 29:                   help='Set the terminal output to be readable')
Line 30: 
Line 31: (opt, args) = parser.parse_args()
> () not needed:
Done
Line 32: 
Line 33: 
Line 34: def write_output(msg):
Line 35:     sys.stdout.write(msg)


Line 39: def write_progress():
Line 40:     for i in range(101):
Line 41:         write_output('    (%s/100%%)\r' % str(i))
Line 42: 
Line 43: progress = 0
> This is not progress but elapsed time.
Done
Line 44: write_output('[   %d.0] Opening the source -i libvirt\n' % progress)
Line 45: progress = progress + 1
Line 46: write_output('[   %d.0] Creating an overlay to protect\n' % progress)
Line 47: progress = progress + 1


Line 49:     write_output('[  %d.0] Copying disk %d/2 to %s/%s/images/%s\n' %
Line 50:                  (progress, i+1, opt.outputStorage, opt.vdsmVmId, o))
Line 51:     write_progress()
Line 52:     progress = progress + 100
Line 53: write_output('[ %d.0] Creating output metadata' % progress)
> missing \n
Done


Line 50:                  (progress, i+1, opt.outputStorage, opt.vdsmVmId, o))
Line 51:     write_progress()
Line 52:     progress = progress + 100
Line 53: write_output('[ %d.0] Creating output metadata' % progress)
Line 54: write_output('[ %d.0] Finishing off' % progress)
> Same
Done


-- 
To view, visit https://gerrit.ovirt.org/47738
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If062a1136921af19a2ffcb4d147611bbc9cf5464
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list