Change in vdsm[master]: jsonrpcvdscli: create a client for vdsm with jsonrpc

fromani at redhat.com fromani at redhat.com
Wed Apr 22 08:38:27 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: jsonrpcvdscli: create a client for vdsm with jsonrpc
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/39203/4/lib/vdsm/jsonrpcvdscli.py
File lib/vdsm/jsonrpcvdscli.py:

Line 28:     JsonRpcRequest, \
Line 29:     CALL_TIMEOUT
Line 30: 
Line 31: 
Line 32: command_converter = {
minor: let's make it clear this is a constant (it is a constant? :)):

  COMMAND_CONVERTER = {
    ...

should also be private:

  _COMMAND_CONVERTER = {
    ...
Line 33:     'ping': 'Host.ping',
Line 34:     'destroy': 'VM.destroy',
Line 35:     'getVmStats': 'VM.getStats',
Line 36:     'migrationCreate': 'VM.migrationCreate',


Line 44: 
Line 45:     def _callMethod(self, methodName, *args):
Line 46:         try:
Line 47:             method = command_converter[methodName]
Line 48:         except AttributeError as e:
how can this raise AttributeError?
Line 49:             raise InvalidCall(methodName, args, e)
Line 50: 
Line 51:         req = JsonRpcRequest(method, args, reqId=str(uuid4()))
Line 52:         call = self._client.call_async(req)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9dbd70d28968db1305628281015f7b2379c8058
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets 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