summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-13 10:49:39 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-13 11:18:15 +0200
commit78d375a3a354b0cc93bdfc36fd828c691f9ccb56 (patch)
tree0b18ed56e88b493728631f2d630930947e27c615 /smoketest/scripts
parent1d2531075269ee627ff2a138f5bf65b1ed3933a5 (diff)
downloadvyos-1x-78d375a3a354b0cc93bdfc36fd828c691f9ccb56.tar.gz
vyos-1x-78d375a3a354b0cc93bdfc36fd828c691f9ccb56.zip
bonding: T3543: add support to configure lacp-rate (slow or fast)
Option specifying the rate in which we'll ask our link partner to transmit LACPDU packets in 802.3ad mode. set interfaces bonding bond0 lacp-rate <slow|fast> slow: Request partner to transmit LACPDUs every 30 seconds (default) fast: Request partner to transmit LACPDUs every 1 second (cherry picked from commit 8e392a3dbc16f7b80a979f7b4e9c11408d700e6f)
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_bonding.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py
index b98cc30f9..9480263d8 100755
--- a/smoketest/scripts/cli/test_interfaces_bonding.py
+++ b/smoketest/scripts/cli/test_interfaces_bonding.py
@@ -111,5 +111,24 @@ class BondingInterfaceTest(BasicInterfaceTest.BaseTest):
# check LACP default rate
self.assertEqual('slow', tmp['linkinfo']['info_data']['ad_lacp_rate'])
+ def test_bonding_lacp_rate(self):
+ # configure member interfaces
+ lacp_rate = 'fast'
+ for interface in self._interfaces:
+ for option in self._options.get(interface, []):
+ self.session.set(self._base_path + [interface] + option.split())
+
+ self.session.set(self._base_path + [interface, 'lacp-rate', lacp_rate])
+
+ self.session.commit()
+
+ # verify config
+ for interface in self._interfaces:
+ tmp = get_json_iface_options(interface)
+
+ # check LACP minimum links (default value)
+ self.assertEqual(0, tmp['linkinfo']['info_data']['min_links'])
+ self.assertEqual(lacp_rate, tmp['linkinfo']['info_data']['ad_lacp_rate'])
+
if __name__ == '__main__':
unittest.main(verbosity=2)