Change in vdsm[master]: tests: functional - convert to run over jsonrpc
ybronhei at redhat.com
ybronhei at redhat.com
Wed Oct 28 07:07:28 UTC 2015
Yaniv Bronhaim has posted comments on this change.
Change subject: tests: functional - convert to run over jsonrpc
......................................................................
Patch Set 8:
(4 comments)
https://gerrit.ovirt.org/#/c/45789/8/lib/vdsm/jsonrpcvdscli.py
File lib/vdsm/jsonrpcvdscli.py:
Line 59: 'setCpuTuneQuota': 'VM.setCpuTuneQuota',
Line 60: 'setMOMPolicy': 'Host.setMOMPolicy',
Line 61: 'setSafeNetworkConfig': 'Host.setSafeNetworkConfig',
Line 62: 'setupNetworks': 'Host.setupNetworks',
Line 63: 'updateVmPolicy': 'VM.updateVmPolicy',
I guess there are many more verbs.. those are only the needed once for the functional tests? can you add all verbs in one patch?
Line 64: }
Line 65:
Line 66:
Line 67: class _Server(object):
Line 93: timeout = kwargs.pop('longOp', CALL_TIMEOUT)
Line 94:
Line 95: req = JsonRpcRequest(method, params, reqId=str(uuid4()))
Line 96:
Line 97: responses = self._client.call(req, timeout=timeout)
I'd split this additional timeout to another patch
Line 98: if responses:
Line 99: resp = responses[0]
Line 100: else:
Line 101: raise JsonRpcNoResponseError(method)
Line 105: resp.error["message"])
Line 106:
Line 107: if not self._compat:
Line 108: return response.success_raw(resp.result)
Line 109:
need more info why or when to use compat=True.. I'd add this in separate patch to have this explanation in the commit msg
Line 110: if resp.result and resp.result is not True:
Line 111: # None is translated to True inside our JSONRPC implementation
Line 112: return response.success(**resp.result)
Line 113:
Line 120:
Line 121: def create(self, params):
Line 122: return self._callMethod('create',
Line 123: params['vmId'],
Line 124: params)
why those two are different from the others methods?
Line 125:
Line 126: def __getattr__(self, methodName):
Line 127: return partial(self._callMethod, methodName)
Line 128:
--
To view, visit https://gerrit.ovirt.org/45789
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaba1e2811f010e4509a658acef8040ad8f39cece
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Jenkins CI
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-HasComments: Yes
More information about the vdsm-patches
mailing list