Nir Soffer has posted comments on this change. Change subject: v2v: add fake virt-v2v process for testing without virt-v2v ......................................................................
Patch Set 4: (4 comments) The fake-virt-v2v looks fine now, I don't understand the test. https://gerrit.ovirt.org/#/c/47738/4/tests/fake-virt-v2v.py File tests/fake-virt-v2v.py: Line 48: action='store_true', Line 49: help='Set the terminal output to be readable') Line 50: parser.add_argument('vmname') Line 51: Line 52: elapsed_time = 0 I would define it after parsing arguments. Line 53: options = parser.parse_args(sys.argv) Line 54: Line 55: Line 56: def write_output(msg): Line 66: Line 67: write_output('[ %d.0] Opening the source -i libvirt\n' % elapsed_time) Line 68: elapsed_time = elapsed_time + 1 Line 69: write_output('[ %d.0] Creating an overlay to protect\n' % elapsed_time) Line 70: elapsed_time = elapsed_time + 1 An empty line separating the first part from the loop would be nice. Line 71: for i, o in enumerate(options.vdsmImageId): Line 72: write_output('[ %d.0] Copying disk %d/2 to %s/%s/images/%s\n' % Line 73: (elapsed_time, i+1, options.outputStorage, Line 74: options.vdsmVmId, o)) https://gerrit.ovirt.org/#/c/47738/4/tests/v2vTests.py File tests/v2vTests.py: Line 36: import vmfakelib as fake Line 37: Line 38: Line 39: VmSpec = namedtuple('VmSpec', ['name', 'vmid']) Line 40: _job_id = '00000000-0000-0000-0000-000000000005' Is this constant? should be in uppercase. Line 41: Line 42: Line 43: def _mac_from_uuid(vmid): Line 44: return "52:54:%s:%s:%s:%s" % ( Line 315: '00000000-0000-0000-0000-000000000004'}]} Line 316: url = 'vpx://adminr%[email protected]/ovirt/0.0.0.0?no_verify=1' Line 317: ivm = v2v.ImportVm.from_libvirt(url, 'root', 'mypassword', vminfo, Line 318: self._id, None) Line 319: ivm._import() What are you trying to test here? What kind of failures are possible? -- 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: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
