Change in vdsm[master]: Extract helper functions to update nic and bonding's mtu
gvallare at redhat.com
gvallare at redhat.com
Mon May 20 08:58:26 UTC 2013
Giuseppe Vallarelli has posted comments on this change.
Change subject: Extract helper functions to update nic and bonding's mtu
......................................................................
Patch Set 1: Looks good to me, but someone else must approve
(2 inline comments)
I like this patch, it's a clear improvement. Feel free to skip the hint related to updateConfigValue, we may address that in a different patch. Thanks, Giuseppe.
....................................................
File vdsm/netconf/ifcfg.py
Line 637: def setBondingMtu(self, bonding, newmtu):
Line 638: self.setIfaceMtu(bonding, newmtu)
Line 639: slaves = netinfo.slaves(bonding)
Line 640: for slave in slaves:
Line 641: self.setIfaceMtu(slave, newmtu)
I know it's not the purpose of this patch, but I think it would be cool making _updateConfigValue _updateConfig passing a dictionary with entries and related values. What do you think?
Line 642:
Line 643: def setNewMtu(self, network, bridged, _netinfo=None):
Line 644: """
Line 645: Set new MTU value to network and its interfaces
Line 690: if currmtu and newmtu != currmtu:
Line 691: if bonding:
Line 692: self.setBondingMtu(bonding, newmtu)
Line 693: else:
Line 694: self.setIfaceMtu(nics[0], newmtu)
Why is it the first nic? Does it have a special meaning, if so extract the index in a variable.
Line 695:
Line 696:
Line 697: def ifdown(iface):
Line 698: "Bring down an interface"
--
To view, visit http://gerrit.ovirt.org/14871
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic82b1d9a27492619548f1c7ba3fced79ee68a1a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
More information about the vdsm-patches
mailing list