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 14:48:21 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 3: Verified+1

(5 comments)

Passed ovs_driver_test.py

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

Line 39: 
Line 40: # if there is just one item in a list, it is reported as single item
Line 41: _DB_ENTRIES_WHICH_SHOULD_BE_LIST = {'ports', 'interfaces'}
Line 42: # if a single item entry is not defined, it is reported as empty list
Line 43: _DB_ENTRIES_WHICH_SHOULD_NOT_BE_LIST = {
> nit:
Done
Line 44:     'tag', 'bond_active_slave', 'bond_mode', 'lacp'}
Line 45: 
Line 46: 
Line 47: class Transaction(DriverTransaction):


Line 93:     def set_raw_result(self, data):
Line 94:         self._result = data.split(r'\n') if data else []
Line 95: 
Line 96: 
Line 97: class DBResultCommand(Command):
> Could you please move the helper funcs to the end of the file?
Done
Line 98: 
Line 99:     def set_raw_result(self, data):
Line 100:         if not data:
Line 101:             self._result = None


PS2, Line 103: 
> data
Done


Line 101:             self._result = None
Line 102:             return
Line 103: 
Line 104:         try:
Line 105:             jdata = json.loads(data)
> If there is a single value, will it be still a list?
Done
Line 106:         except (ValueError, TypeError):
Line 107:             self._result = ['ERROR: Unable to interpret cmd output', data]
Line 108:             return
Line 109: 


PS2, Line 132:     def add_br(self, bridge, may_exist=False):
             :         command = []
             :         if may_exist:
             :             command.append('--may-exist')
> Better extract this to a method: _normalize() ?
Done


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