Dan Kenigsberg has posted comments on this change.
Change subject: NetReload: netmodels for editBonding/removeBonding
......................................................................
Patch Set 9: I would prefer that you didn't submit this
(2 inline comments)
relatively minor question
....................................................
File vdsm/configNetwork.py
Line 380: raise ConfigNetworkError(ne.ERR_BAD_NIC,
Line 381: "Unknown nics in: %r" %
list(nics))
Line 382:
Line 383:
Line 384: def _handleBondings(bondings, configurator):
A function named "handle" is not a good sign, usually. But I cannot think of
anything better (updateBonding is not really better). Can you?
Line 385: """ Add/Edit/Remove bond interface """
Line 386: logger = logging.getLogger("_handleBondings")
Line 387:
Line 388: _netinfo = netinfo.NetInfo()
....................................................
File vdsm/netmodels.py
Line 187: if name and nics: # New bonding or edit bonding.
Line 188: slaves = cls._objectivizeSlaves(name, configurator, nics,
mtu,
Line 189: _netinfo)
Line 190: if name in _netinfo.bondings and not options:
Line 191: mtu = max(netinfo.getMtu(name), mtu)
why does maximizing "mtu" depends on the bonding options? If only we had a unit
test where a bond is edited by changing both its options and mtu..
Line 192: options =
_netinfo.bondings[name]['cfg'].get('BONDING_OPTS')
Line 193: elif name in _netinfo.bondings: # Implicit bonding.
Line 194: mtu = max(netinfo.getMtu(name), mtu)
Line 195: slaves = [Nic(nic, configurator, mtu=mtu,
_netinfo=_netinfo)
--
To view, visit http://gerrit.ovirt.org/15356
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9ab6fabb01d38c0e23a950bc5b693fe597b7d21c
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[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