Merge "Added support for setting bond-lacp-rate and bond-xmit_hash_policy"

This commit is contained in:
Jenkins 2016-07-15 18:38:40 +00:00 committed by Gerrit Code Review
commit 3b4280fe35
3 changed files with 25 additions and 3 deletions

View File

@ -393,7 +393,11 @@ def write_debian_interfaces(interfaces, sys_interfaces):
interface['mac_address'])
result += " bond-mode {0}\n".format(interface['bond_mode'])
result += " bond-miimon {0}\n".format(
interface['bond_miimon'])
interface.get('bond_miimon', 0))
result += " bond-lacp-rate {0}\n".format(
interface.get('bond_lacp_rate', 'slow'))
result += " bond-xmit_hash_policy {0}\n".format(
interface.get('bond_xmit_hash_policy', 'layer2'))
slave_devices = [sys_interfaces[mac]
for mac in interface['raw_macs']]
slaves = ' '.join(slave_devices)
@ -413,7 +417,11 @@ def write_debian_interfaces(interfaces, sys_interfaces):
interface['mac_address'])
result += " bond-mode {0}\n".format(interface['bond_mode'])
result += " bond-miimon {0}\n".format(
interface['bond_miimon'])
interface.get('bond_miimon', 0))
result += " bond-lacp-rate {0}\n".format(
interface.get('bond_lacp_rate', 'slow'))
result += " bond-xmit_hash_policy {0}\n".format(
interface.get('bond_xmit_hash_policy', 'layer2'))
slave_devices = [sys_interfaces[mac]
for mac in interface['raw_macs']]
slaves = ' '.join(slave_devices)
@ -444,7 +452,11 @@ def write_debian_interfaces(interfaces, sys_interfaces):
interface['mac_address'])
result += " bond-mode {0}\n".format(interface['bond_mode'])
result += " bond-miimon {0}\n".format(
interface['bond_miimon'])
interface.get('bond_miimon', 0))
result += " bond-lacp-rate {0}\n".format(
interface.get('bond_lacp_rate', 'slow'))
result += " bond-xmit_hash_policy {0}\n".format(
interface.get('bond_xmit_hash_policy', 'layer2'))
slave_devices = [sys_interfaces[mac]
for mac in interface['raw_macs']]
slaves = ' '.join(slave_devices)

View File

@ -44,6 +44,8 @@ iface bond0 inet dhcp
hwaddress bc:76:4e:05:7b:13
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate slow
bond-xmit_hash_policy layer3+4
bond-slaves eth5 eth6
### Write /etc/network/interfaces.d/eth7.cfg
auto eth7
@ -59,6 +61,8 @@ iface bond1 inet manual
hwaddress bc:76:4e:05:7b:15
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate slow
bond-xmit_hash_policy layer3+4
bond-slaves eth7 eth8
### Write /etc/network/interfaces.d/bond1.27.cfg
auto bond1.27
@ -71,6 +75,8 @@ iface bond2 inet static
hwaddress bc:76:4e:05:7b:17
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate slow
bond-xmit_hash_policy layer3+4
bond-slaves eth9 eth10
address 192.0.2.2
netmask 255.255.255.0

View File

@ -44,6 +44,8 @@ iface bond0 inet dhcp
hwaddress bc:76:4e:05:7b:13
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate slow
bond-xmit_hash_policy layer3+4
bond-slaves eth5 eth6
### Write /etc/network/interfaces.d/eth7.cfg
auto eth7
@ -59,6 +61,8 @@ iface bond1 inet manual
hwaddress bc:76:4e:05:7b:15
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate slow
bond-xmit_hash_policy layer3+4
bond-slaves eth7 eth8
### Write /etc/network/interfaces.d/bond1.27.cfg
auto bond1.27