diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-05-10 16:36:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 16:36:21 +0200 |
commit | d93aedfe993a6e9868ee88803c2dc981cabdfc15 (patch) | |
tree | 9d1977454f35746adc20df4f7c1b7739f176f3b6 /smoketest | |
parent | 4960a67e12c1d10a59812f0167f017131a9617b5 (diff) | |
parent | bced1b4ef04f9e1a12c083c08839e4c1a54e2549 (diff) | |
download | vyos-1x-d93aedfe993a6e9868ee88803c2dc981cabdfc15.tar.gz vyos-1x-d93aedfe993a6e9868ee88803c2dc981cabdfc15.zip |
Merge pull request #3441 from vyos/mergify/bp/sagitta/pr-3410
Bond: T6303: add system mac address on interfaces bond (backport #3410)
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_bonding.py | 28 |
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: |