Antoni Segura Puimedon has posted comments on this change.
Change subject: Extract bonding options building into a separate function.
......................................................................
Patch Set 7: Looks good to me, but someone else must approve
(2 inline comments)
I have a minor comment to keep consistency with other methods, but since the
evolution moves away from there and _buildOptions has but one client, feel free
to ignore my comments.
....................................................
File vdsm/configNetwork.py
Line 1318:
Line 1319: del bondings[bond]
Line 1320:
Line 1321:
Line 1322: def _buildBondOptions(bondName, bondings, _netinfo):
I would put _netinfo as having a default value of None, to allow for calling
_buildOptions with an implicit netinfo full refresh.
However, it is likely that it would end up being removed in later patches.
Line 1323: logger = logging.getLogger("_buildBondOptions")
Line 1324:
Line 1325: bond = {}
Line 1326: if bondings.get(bondName):
Line 1320:
Line 1321:
Line 1322: def _buildBondOptions(bondName, bondings, _netinfo):
Line 1323: logger = logging.getLogger("_buildBondOptions")
Line 1324:
I would add here the:
if _netinfo is None:
_netinfo = netinfo.NetInfo()
Line 1325: bond = {}
Line 1326: if bondings.get(bondName):
Line 1327: bond['nics'] = bondings[bondName]['nics']
Line 1328: bond['bondingOptions'] = bondings[bondName].get('options',
None)
--
To view, visit http://gerrit.ovirt.org/8885
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I77fefefcefa05f5bd0d7fa2755357d88b7aa615e
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches