Milan Zamazal has posted comments on this change. Change subject: v2v: Lazy loading of external VMs info ......................................................................
Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/57418/1/lib/vdsm/utils.py File lib/vdsm/utils.py: Line 413: if s is None: Line 414: return False Line 415: if type(s) == bool: Line 416: return s Line 417: if str(s).lower() == 'true': Why do you need this change? Line 418: return True Line 419: return bool(int(s)) Line 420: except: Line 421: return False https://gerrit.ovirt.org/#/c/57418/1/lib/vdsm/v2v.py File lib/vdsm/v2v.py: Line 166: _add_vm(conn, vms, vm) Line 167: else: Line 168: vms.append({'vmName': vm.name(), Line 169: 'status': 'Up' if vm.ID() > -1 else 'Down'}) Line 170: > maybe _add_vm can handle the "names_only"... ... and we are already inconsistent with vm.ID() vs. vm.isActive() without explanation. Line 171: return {'status': doneCode, 'vmList': vms} Line 172: Line 173: Line 174: def convert_external_vm(uri, username, password, vminfo, job_id, irs): https://gerrit.ovirt.org/#/c/57418/1/tests/v2vTests.py File tests/v2vTests.py: Line 328: def _connect(uri, username, passwd): Line 329: return MockVirConnect(vms=self._vms) Line 330: Line 331: vmIDs = [1, 3] Line 332: names = [vm.name for vm in VM_SPECS if vm.id in vmIDs] I'd suggest adding a non-existent name here to check that nothing bad happens. Line 333: Line 334: with MonkeyPatchScope([(libvirtconnection, 'open_connection', Line 335: _connect)]): Line 336: vms = v2v.get_external_vms('esx://mydomain', 'user', -- To view, visit https://gerrit.ovirt.org/57418 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3dc6fc4573b2c0b1c03ed87025452e14af2fc566 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Tomas Golembiovsky <tgole...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com> Gerrit-Reviewer: Milan Zamazal <mzama...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Golembiovsky <tgole...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@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