Change in vdsm[master]: rpc.Bridge: sanitize optional, positional argument names
osvoboda at redhat.com
osvoboda at redhat.com
Tue Aug 25 13:01:48 UTC 2015
Ondřej Svoboda has posted comments on this change.
Change subject: rpc.Bridge: sanitize optional, positional argument names
......................................................................
Patch Set 1:
(3 comments)
Moving the name cleanup in _nameArgs, that's a better place than _getArgList indeed.
https://gerrit.ovirt.org/#/c/45274/1/tests/bridgeTests.py
File tests/bridgeTests.py:
Line 157: @MonkeyPatch(DynamicBridge, '_getApiInstance', _getApiInstance)
Line 158: def testPositionalOptionalParameters(self):
Line 159: bridge = DynamicBridge()
Line 160:
Line 161: args = ('test-network', '', 'bond11', ['dummy_qknSQ', 'dummy_UdwMH'],
> This argument list is different than to the one provided in testAddDelBonde
For revision 2 of the patch I extracted a real JSON (from yajsonrpc.JsonRpcServer._parseMessage) when running
NOSE_TESTMATCH="testAddDelBondedNetwork" ./run_tests.sh functional/networkTests.py
on current master and with "tests: functional - convert to run over jsonrpc" not reverted.
Line 162: {'bridged': False})
Line 163:
Line 164: method = getattr(bridge, 'Host_addNetwork')
https://gerrit.ovirt.org/#/c/45274/1/vdsm/rpc/Bridge.py
File vdsm/rpc/Bridge.py:
Line 247:
We have to clean names (originating from the schema) of asterisks, otherwise there would be a mismatch between parameters coming as kwargs proper (passed as a dictionary through JSON RPC) and parameters coming in as a list (which is true for functional tests now).
Line 250
Line 251
Line 252
Line 253
Line 254
> This code is OK. There is no need to use symNameFilter here. It is done lat
You are right, this function should stay clean. But please note that _nameArgs does need a fix.
--
To view, visit https://gerrit.ovirt.org/45274
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic23ca1d06a394c73ae746e123209375ceb90243c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.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