Francesco Romani has posted comments on this change. Change subject: virt: clientIF: extract vmContainer into a module ......................................................................
Patch Set 7: (4 comments) thanks for the early review https://gerrit.ovirt.org/#/c/53101/7//COMMIT_MSG Commit Message: PS7, Line 16: proper singleton > Not a proper singleton unless it is initialized on module level. Right, stale commit message, needs to be updated. https://gerrit.ovirt.org/#/c/53101/7/lib/vdsm/virt/vmstore.py File lib/vdsm/virt/vmstore.py: PS7, Line 52: Added for testing purposes only. > New API should not be polluted by test helpers. I guess this API makes sense outside tests as well. PS7, Line 89: if vm.id in self._vms: : del self._vms[vm.id] : else: : raise UnknownVM(vm.id) > Use negative condition and raise without else block. Right, good tip PS7, Line 94: def get(self, vm_id): > get(...) sure, but this is not really supposed to look like a dict. Key example: we will store only VM instances here, and we will get them only by their UUID. (perhaps by name in a distant future? but unlikely more than that). So not sure making this more like a dict adds deception or clarity. -- To view, visit https://gerrit.ovirt.org/53101 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iacd2ae6c5e9ca6a73c0fed978c78c9ebb001c46d Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@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: Milan Zamazal <mzama...@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/admin/lists/vdsm-patches@lists.fedorahosted.org