Shahar Havivi has posted comments on this change.

Change subject: v2v: externalVMList Xen+Kvm support
......................................................................


Patch Set 16:

(2 comments)

https://gerrit.ovirt.org/#/c/48672/16/vdsm/v2v.py
File vdsm/v2v.py:

Line 642:         for vm in conn.listAllDomains():
Line 643:             yield vm
Line 644:     except libvirt.libvirtError as e:
Line 645:         # TODO: use new API: listAllDomain() when supported in Xen
Line 646:         #       under RHEL 5.x
> this comment is useful, but seems misplaced here.
this comment is not needed,
next comment explain why
Line 647:         if e.get_error_code() != libvirt.VIR_ERR_NO_SUPPORT:
Line 648:             raise
Line 649:         seen = set()
Line 650:         for name in conn.listDefinedDomains():


Line 654:         for vmid in conn.listDomainsID():
Line 655:             vm = conn.lookupByID(vmid)
Line 656:             if vm.name() in seen:
Line 657:                 continue
Line 658:             yield vm
> codewise seems fine, but I'd pack this in an helper function. Maybe:
the idea is to always try the new code (liastAllDomains) and to fall back to 
the old code(listDefinedDomains) if we get an error VIR_ERR_NO_SUPPORT
Line 659: 
Line 660: 
Line 661: def _add_vm(conn, vms, vm):
Line 662:     params = {}


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic7d7e211a9343a528f260da2686b34cea00c53a4
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shav...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskri...@redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzama...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Shahar Havivi <shav...@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

Reply via email to