Change in vdsm[master]: rpc.Bridge: support positional optional parameters, in addit...

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Tue Aug 25 08:10:41 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: rpc.Bridge: support positional optional parameters, in addition to kwargs
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

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 testAddDelBondedNetwork.

Please notice that vlan was never part of argument list.

Please check following json:

        msg = ('{"jsonrpc":"2.0","method":"Host.addNetwork","params":{"options'
               '":{"bridged":false},"bridge":"test-network","bond": "bond11",'
               '"nics": ["dummy_qknSQ", "dummy_UdwMH"]},"id":"505ebe58-4fd7-45'
               'c6-8195-61e3a6d1dce9"}')

This is exactly what the test would send and parameters are passed properly and this json works with the Bridge.py without any modifications.
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 250
Line 251
Line 252
Line 253
Line 254
This code is OK. There is no need to use symNameFilter here. It is done later when required.


-- 
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