Change in vdsm[master]: net: some values should be or should not be list

phoracek at redhat.com phoracek at redhat.com
Wed May 4 15:59:54 UTC 2016


Petr Horáček has posted comments on this change.

Change subject: net: some values should be or should not be list
......................................................................


Patch Set 4: Verified+1

(4 comments)

Passed ovs_driver_test.py

https://gerrit.ovirt.org/#/c/57034/3/lib/vdsm/network/ovs/driver/vsctl.py
File lib/vdsm/network/ovs/driver/vsctl.py:

PS3, Line 117:                 obj[heading] = _normalize(heading, _val_to_py(record[pos]))
             :             results.append(obj)
> Why not direct?
Done


PS3, Line 228: 
             : 
             : def _convert_to
> nit: return data if isinstance(data, list) else [data]
Done


PS3, Line 234: def _normalize(heading, value):
             :     if heading in _DB_ENTRIES_WHICH_SHOULD_BE_LIST:
             :         value =
> nit: return none if data == [] else data
Done


Line 236:         value = _convert_to_list(value)
Line 237:     elif heading in _DB_ENTRIES_WHICH_SHOULD_NOT_BE_LIST:
Line 238:         value = _convert_to_single(value)
Line 239:     return value
Line 240
> nit: it will be safer to have a test checking that the two sets are mutual 
Added a TODO


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1cda6b112e933c1ebaaaad79bd9485d99e8198f2
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list