Mark Wu has uploaded a new change for review. Change subject: Reduce arguments for addVlan ......................................................................
Reduce arguments for addVlan Change-Id: I5ee6243ec67e6fa0d070d608f59886dc39cc80b1 Signed-off-by: Mark Wu <[email protected]> --- M vdsm/configNetwork.py 1 file changed, 5 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/11358/1 diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index bd5fa9d..b6fc218 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -452,15 +452,13 @@ conf = 'TYPE=Bridge\nDELAY=%s\n' % pipes.quote(delay) self._createConfFile(conf, name, mtu, onboot, **kwargs) - def addVlan(self, vlanId, iface, network, mtu=None, bridged=True, - onboot='yes', **kwargs): + def addVlan(self, vlan, bridge=None, mtu=None, onboot='yes', **kwargs): """ Create ifcfg-* file with proper fields for VLAN """ - name = '%s.%s' % (pipes.quote(iface), vlanId) conf = 'VLAN=yes\n' - if bridged: - conf += 'BRIDGE=%s\n' % pipes.quote(network) + if bridge: + conf += 'BRIDGE=%s\n' % pipes.quote(bridge) - self._createConfFile(conf, name, mtu, onboot, **kwargs) + self._createConfFile(conf, vlan, mtu, onboot, **kwargs) def addBonding(self, bonding, bridge=None, bondingOptions=None, mtu=None, onboot='yes', **kwargs): @@ -942,9 +940,8 @@ if vlan: # don't ifup VLAN interface here, it should be done last, # after the bond and nic up - configWriter.addVlan(vlan, iface, network=brName, - mtu=mtu, bridged=bridged, **options) iface += '.' + vlan + configWriter.addVlan(iface, bridge=brName, mtu=mtu, **options) # First we need to prepare all conf files if bonding: -- To view, visit http://gerrit.ovirt.org/11358 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ee6243ec67e6fa0d070d608f59886dc39cc80b1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
