Dan Kenigsberg has posted comments on this change.

Change subject: net: removing the bonding modes constant duplication.
......................................................................


Patch Set 4: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/49170/4/lib/vdsm/netinfo.py
File lib/vdsm/netinfo.py:

Line 102: iteritems())
please use

 six.iteritems()

in new code.


https://gerrit.ovirt.org/#/c/49170/4/vdsm/network/models.py
File vdsm/network/models.py:

Line 320:             raise ConfigNetworkError(ne.ERR_BAD_BONDING, 'Error 
parsing '
Line 321:                                      'bonding options: %r' % 
bondingOptions)
Line 322: 
Line 323:         if mode in netinfo.BONDING_MODES_NAME_TO_NUMBER:
Line 324:             mode = netinfo.BONDING_MODES_NAME_TO_NUMBER[mode]
> or maybe 'mode = netinfo.BONDING_MODES_NAME_TO_NUMBER.get(mode) or mode'
short-circuit logic can be nice some time, but I don't see its benefit here. 
Better keep Ido's current suggestion.
Line 325:         defaults = netinfo.getDefaultBondingOptions(mode)
Line 326: 
Line 327:         for option in bondingOptions.split():
Line 328:             key, _ = option.split('=', 1)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia6682c7294f5afb8d50a30c6bd0431d85bbd159d
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Edward Haas <[email protected]>
Gerrit-Reviewer: Ido Barkan <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <[email protected]>
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to