Change in vdsm[master]: net: api: refactoring of _handleBondings
edwardh at redhat.com
edwardh at redhat.com
Mon Feb 22 20:11:41 UTC 2016
Edward Haas has posted comments on this change.
Change subject: net: api: refactoring of _handleBondings
......................................................................
Patch Set 10:
(2 comments)
https://gerrit.ovirt.org/#/c/53695/10/lib/vdsm/network/api.py
File lib/vdsm/network/api.py:
Line 644:
Line 645: return True
Line 646:
Line 647:
Line 648: def _bond_setup(bondings, configurator, _netinfo):
> but then we would call them from this function? i don't think we want to ad
I think it is cleaner, I like it more.
A function that does one thing and is small == clean :)
Why two funcs instead of one is a problem?
Line 649: """Gather to-be-edited/added bondings and apply changes"""
Line 650: _netinfo = CachingNetInfo()
Line 651:
Line 652: edition = {}
Line 651:
Line 652: edition = {}
Line 653: addition = {}
Line 654: for name, attrs in bondings.items():
Line 655: if 'remove' not in attrs:
> we can do the spit of 'remove' and 'not-remove' bondings definitions in a s
I meant to avoid this question.
If the bond have been already removed, why should we see it here? I think there is one scenario when this may be needed, not sure.
Line 656: if name in _netinfo.bondings:
Line 657: edition[name] = attrs
Line 658: else:
Line 659: addition[name] = attrs
--
To view, visit https://gerrit.ovirt.org/53695
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I02e34470a39f84ada0246cf35e12c52990ed7134
Gerrit-PatchSet: 10
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: Ondřej Svoboda <osvoboda at redhat.com>
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