Change in vdsm[master]: tests: functional - convert to run over jsonrpc

ykaplan at redhat.com ykaplan at redhat.com
Sun Nov 1 14:52:54 UTC 2015


Yeela Kaplan has posted comments on this change.

Change subject: tests: functional - convert to run over jsonrpc
......................................................................


Patch Set 9:

(3 comments)

https://gerrit.ovirt.org/#/c/45789/9/lib/vdsm/jsonrpcvdscli.py
File lib/vdsm/jsonrpcvdscli.py:

Line 120: 
Line 121:     def create(self, params):
Line 122:         return self._callMethod('create',
Line 123:                                 params['vmId'],
Line 124:                                 params)
> this is a bit odd .. it worth a comment to understand why only those two ne
This is just the way it is translated by the bridge. so these are the arguments jsonrpc expects.
Line 125: 
Line 126:     def __getattr__(self, methodName):
Line 127:         return partial(self._callMethod, methodName)
Line 128: 


https://gerrit.ovirt.org/#/c/45789/9/tests/functional/utils.py
File tests/functional/utils.py:

Line 164:         stack = inspect.stack()
Line 165:         # add calling method for logs
Line 166:         test_method, code_line = stack[3][3], stack[3][2]
Line 167:         options['_caller'] = '{}:{}'.format(test_method, code_line)
Line 168:         result = self.vdscli.setupNetworks(networks, bonds, options, longOp=30)
> this change should be in previous patch that adds the check of longOp. I wo
Changed to timeout.

As we've discussed this cannot change position. otherwise tests will break.
Line 169:         return _parse_result(result)
Line 170: 
Line 171:     def _vlanInRunningConfig(self, devName, vlanId):
Line 172:         for net, attrs in self.config.networks.iteritems():


Line 204:         finally:
Line 205:             done = True
Line 206: 
Line 207:     def getVdsStats(self):
Line 208:         result = self.vdscli.getVdsStats()
> so why do we keep the old interface? that way we will never get rid of this
Once we deprecate xmlrpc, we can change everything to be compatible with jsonrpc.
Until then making this compatible just creates a lot of extra work and unnecessary re-translations.
Line 209:         return _parse_result(result, True)
Line 210: 
Line 211:     def getAllVmStats(self):
Line 212:         result = self.vdscli.getAllVmStats()


-- 
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: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer 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-HasComments: Yes


More information about the vdsm-patches mailing list