summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-10 15:20:39 +0200
committerGitHub <noreply@github.com>2024-05-10 15:20:39 +0200
commitdef74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f (patch)
tree740a1b0b388723ee09ef6043da3e789aee3fc924 /smoketest
parent8fa1cb497f8f4e16d95c1485897663220d86c18e (diff)
parent314901e7b45782fb6266b35b0e788ab7ea1404b8 (diff)
downloadvyos-1x-def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f.tar.gz
vyos-1x-def74a8fa4e0fb9c7ef95bfb6daff8a4f1a9878f.zip
Merge pull request #3410 from fett0/T6303
Bond: T6303: add system mac address on interfaces bond
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_bonding.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py
index 419de774a..f436424b8 100755
--- a/smoketest/scripts/cli/test_interfaces_bonding.py
+++ b/smoketest/scripts/cli/test_interfaces_bonding.py
@@ -241,6 +241,34 @@ class BondingInterfaceTest(BasicInterfaceTest.TestCase):
for member in self._members:
self.assertIn(member, slaves)
+ def test_bonding_system_mac(self):
+ # configure member interfaces and system-mac
+ default_system_mac = '00:00:00:00:00:00' # default MAC is all zeroes
+ system_mac = '00:50:ab:cd:ef:11'
+
+ for interface in self._interfaces:
+ for option in self._options.get(interface, []):
+ self.cli_set(self._base_path + [interface] + option.split())
+
+ self.cli_set(self._base_path + [interface, 'system-mac', system_mac])
+
+ self.cli_commit()
+
+ # verify config
+ for interface in self._interfaces:
+ tmp = read_file(f'/sys/class/net/{interface}/bonding/ad_actor_system')
+ self.assertIn(tmp, system_mac)
+
+ for interface in self._interfaces:
+ self.cli_delete(self._base_path + [interface, 'system-mac'])
+
+ self.cli_commit()
+
+ # verify default value
+ for interface in self._interfaces:
+ tmp = read_file(f'/sys/class/net/{interface}/bonding/ad_actor_system')
+ self.assertIn(tmp, default_system_mac)
+
def test_bonding_evpn_multihoming(self):
id = '5'
for interface in self._interfaces: