Change in vdsm[master]: net: api: move removal and editation handling to a separate ...
edwardh at redhat.com
edwardh at redhat.com
Tue Feb 9 23:02:18 UTC 2016
Edward Haas has posted comments on this change.
Change subject: net: api: move removal and editation handling to a separate function
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/53301/1/lib/vdsm/network/api.py
File lib/vdsm/network/api.py:
Line 760:
Line 761: _netinfo.updateDevices() # Things like a bond mtu can change
Line 762:
Line 763:
Line 764: def _remove_networks(configurator, networks, logger, _netinfo, libvirt_nets):
I don't see the benefit of extracting this block of code as a whole.
The first code smell that pops up is the func name, it does not describe what it does (it does much more than removing networks) and it returns a mix of networks (edited and new).
I suggest splitting it into smaller funcs, each doing one thing.
Line 765: """
Line 766: Remove to-be-removed and to-be-edited networks. Return set of to-be-added
Line 767: and to-be-edited networks for future connecitivity check.
Line 768: """
--
To view, visit https://gerrit.ovirt.org/53301
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idba4114717fcf0c5e2075e1250a7d78c42d204ee
Gerrit-PatchSet: 1
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: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list