diff options
author | Penghui Liao <liaoishere@gmail.com> | 2019-06-21 19:41:43 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-06-21 19:41:43 +0000 |
commit | f57a77577dd708c7f57babf8cd63ec18134bf34a (patch) | |
tree | 1da5b5039b98f72d513cda419ab6a7db72298427 /tests | |
parent | e1795a5cd1cb216e5514f55bdb1cddc605f40df3 (diff) | |
download | vyos-cloud-init-f57a77577dd708c7f57babf8cd63ec18134bf34a.tar.gz vyos-cloud-init-f57a77577dd708c7f57babf8cd63ec18134bf34a.zip |
sysconfig: support more bonding options
Currently, only a few bonding parameters can be configured on
sysconfig systems. This patch aims to support more parameters
documented on the docs site.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_net.py | 60 |
1 files changed, 55 insertions, 5 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py index b936bc9c..18efce98 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py @@ -1540,6 +1540,12 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true bond-mode: active-backup bond_miimon: 100 bond-xmit-hash-policy: "layer3+4" + bond-num-grat-arp: 5 + bond-downdelay: 10 + bond-updelay: 20 + bond-fail-over-mac: active + bond-primary: bond0s0 + bond-primary-reselect: always subnets: - type: static address: 192.168.0.2/24 @@ -1586,9 +1592,15 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true macaddress: aa:bb:cc:dd:e8:ff mtu: 9000 parameters: + down-delay: 10 + fail-over-mac-policy: active + gratuitious-arp: 5 mii-monitor-interval: 100 mode: active-backup + primary: bond0s0 + primary-reselect-policy: always transmit-hash-policy: layer3+4 + up-delay: 20 routes: - to: 10.1.3.0/24 via: 192.168.0.3 @@ -1604,15 +1616,27 @@ iface lo inet loopback auto bond0s0 iface bond0s0 inet manual + bond-downdelay 10 + bond-fail-over-mac active bond-master bond0 bond-mode active-backup + bond-num-grat-arp 5 + bond-primary bond0s0 + bond-primary-reselect always + bond-updelay 20 bond-xmit-hash-policy layer3+4 bond_miimon 100 auto bond0s1 iface bond0s1 inet manual + bond-downdelay 10 + bond-fail-over-mac active bond-master bond0 bond-mode active-backup + bond-num-grat-arp 5 + bond-primary bond0s0 + bond-primary-reselect always + bond-updelay 20 bond-xmit-hash-policy layer3+4 bond_miimon 100 @@ -1620,8 +1644,14 @@ auto bond0 iface bond0 inet static address 192.168.0.2/24 gateway 192.168.0.1 + bond-downdelay 10 + bond-fail-over-mac active bond-mode active-backup + bond-num-grat-arp 5 + bond-primary bond0s0 + bond-primary-reselect always bond-slaves none + bond-updelay 20 bond-xmit-hash-policy layer3+4 bond_miimon 100 hwaddress aa:bb:cc:dd:e8:ff @@ -1666,10 +1696,15 @@ iface bond0 inet6 static - eth0 - vf0 parameters: + down-delay: 10 + fail-over-mac-policy: active + gratuitious-arp: 5 mii-monitor-interval: 100 mode: active-backup - primary: vf0 - transmit-hash-policy: "layer3+4" + primary: bond0s0 + primary-reselect-policy: always + transmit-hash-policy: layer3+4 + up-delay: 20 routes: - to: 10.1.3.0/24 via: 192.168.0.3 @@ -1692,10 +1727,15 @@ iface bond0 inet6 static - eth0 - vf0 parameters: + down-delay: 10 + fail-over-mac-policy: active + gratuitious-arp: 5 mii-monitor-interval: 100 mode: active-backup - primary: vf0 + primary: bond0s0 + primary-reselect-policy: always transmit-hash-policy: layer3+4 + up-delay: 20 routes: - to: 10.1.3.0/24 via: 192.168.0.3 @@ -1720,7 +1760,12 @@ iface bond0 inet6 static 'expected_sysconfig_opensuse': { 'ifcfg-bond0': textwrap.dedent("""\ BONDING_MASTER=yes - BONDING_OPTS="mode=active-backup xmit_hash_policy=layer3+4 miimon=100" + BONDING_OPTS="mode=active-backup xmit_hash_policy=layer3+4 """ + """miimon=100 num_grat_arp=5 """ + """downdelay=10 updelay=20 """ + """fail_over_mac=active """ + """primary=bond0s0 """ + """primary_reselect=always" BONDING_SLAVE0=bond0s0 BONDING_SLAVE1=bond0s1 BOOTPROTO=none @@ -1776,7 +1821,12 @@ iface bond0 inet6 static 'expected_sysconfig_rhel': { 'ifcfg-bond0': textwrap.dedent("""\ BONDING_MASTER=yes - BONDING_OPTS="mode=active-backup xmit_hash_policy=layer3+4 miimon=100" + BONDING_OPTS="mode=active-backup xmit_hash_policy=layer3+4 """ + """miimon=100 num_grat_arp=5 """ + """downdelay=10 updelay=20 """ + """fail_over_mac=active """ + """primary=bond0s0 """ + """primary_reselect=always" BONDING_SLAVE0=bond0s0 BONDING_SLAVE1=bond0s1 BOOTPROTO=none |