Change in vdsm[master]: jsonrpc: Fix callMethod in JsonRpcClient

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Thu Mar 12 13:19:43 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: Fix callMethod in JsonRpcClient
......................................................................


Patch Set 6:

(2 comments)

https://gerrit.ovirt.org/#/c/35935/6//COMMIT_MSG
Commit Message:

Line 11: synchronously (call). callMethod help with building JsonRpcRequest and
Line 12: raises an Error in case of any issues occuring on the other side.
Line 13: callMethod was using call_batch which is not needed so we have decided
Line 14: to merge both methods and fix issues around single vs batch number of
Line 15: issues.
> Can you please rephrase a bit to make it obvious that you are dropping call
Done
Line 16: 
Line 17: 
Line 18: Change-Id: I7cf78f3b7f5d32c10339bbe6b49ce9b93662b4bb
Line 19: Signed-off-by: Saggi Mizrahi <smizrahi at redhat.com>


https://gerrit.ovirt.org/#/c/35935/6/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 302: 
Line 303:     def connect(self):
Line 304:         self._transport.connect()
Line 305: 
Line 306:     def callMethod(self, methodName, params=[], rid=None):
> not for this patch: why does this have a nameWithCaps while other methods h
I think that we have mixed conventions here. We have methods like setTimeout, callMethod and in contrast we have call_async and call_cb.

It is good idea to use names with underscores everywhere.
Line 307:         resp = self.call(JsonRpcRequest(methodName, params, rid))[0]
Line 308:         if resp.error:
Line 309:             raise JsonRpcError(resp.error['code'], resp.error['message'])
Line 310: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7cf78f3b7f5d32c10339bbe6b49ce9b93662b4bb
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list