Nir Soffer has posted comments on this change. Change subject: vdsm: lastclient info in jsonrpc ......................................................................
Patch Set 12: (3 comments) Nice! - added some suggestions for making it little more clear. http://gerrit.ovirt.org/#/c/28817/12/lib/yajsonrpc/stompReactor.py File lib/yajsonrpc/stompReactor.py: Line 128: self._messageHandler = msgHandler Line 129: self.check_read() Line 130: Line 131: def check_read(self): Line 132: if isinstance(self.socket, SSLSocket) and self.socket.pending() > 0: For another patch - do not check instance type. You can to this instead, if hasattr(self.socket, 'pending') and self.socket.pending() > 0: This allow you to replace the class with something else the provide the same interface. Line 133: self._stompConn._dispatcher.handle_read() Line 134: Line 135: def send(self, message): Line 136: self.log.debug("Sending response") http://gerrit.ovirt.org/#/c/28817/12/tests/bridgeTests.py File tests/bridgeTests.py: Line 78: return '127.0.0.1' Line 79: Line 80: @property Line 81: def server_address(self): Line 82: return '127.0.0.1' Do you really need this fake? can you use the real object instead? Line 83: Line 84: Line 85: class BridgeTests(TestCaseBase): Line 86: http://gerrit.ovirt.org/#/c/28817/12/vdsm/rpc/Bridge.py File vdsm/rpc/Bridge.py: Line 59: def register(self, ctx): Line 60: self._threadLocal.ctx = ctx Line 61: Line 62: def unregister(self): Line 63: self._threadLocal.ctx = None Not sure we need this - the caller can do instead: bridge.register(None) And it will be even more clear if we call it: bridge.registerContext(ctx) I like short method names but register is not an expected method of a bridge. Line 64: Line 65: def dispatch(self, name, argobj): Line 66: methodName = name.replace('.', '_') Line 67: result = None -- To view, visit http://gerrit.ovirt.org/28817 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I402e15cb05f89a98dab14491d9da5985335e095e Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
