Milan Zamazal has posted comments on this change.

Change subject: virt: clientIF: extract vmContainer into a module
......................................................................


Patch Set 6: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/53101/6/lib/vdsm/virt/vmdict.py
File lib/vdsm/virt/vmdict.py:

Line 84:     with _lock:
Line 85:         if vm.id in _vms:
Line 86:             del _vms[vm.id]
Line 87:         else:
Line 88:             raise UnknownVM()
> You have a point here, but we this 'dict' thingy has to be a singleton, and
I agree with Martin, (re)implementing dictionary this way is not a good idea. 
And I don't agree this is the most pythonic way to define a singleton. Martin's 
suggestion to make the dictionary class private and export just its (single) 
instance created here is the simplest way to get the singleton. Using 
metaclasses or decorators/wrappers are other options, depending on 
circumstances.
Line 89: 
Line 90: 
Line 91: @utils.traceback()
Line 92: def dispatch_eio_cont(libvirt_vms, sdUUID):


-- 
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: 6
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/mailman/listinfo/vdsm-patches

Reply via email to