diff options
author | Christian Breunig <christian@breunig.cc> | 2023-01-25 16:12:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 16:12:13 +0100 |
commit | 8328e4393ad7cff4d2bd6291cd577048da270ccc (patch) | |
tree | 140027f443c1f7ae372b57c92bec19b708a78b02 /smoketest/scripts/cli/test_interfaces_pppoe.py | |
parent | 155d3c1ac748a945ce62d3f9b2629696dbdb4b70 (diff) | |
parent | 36bf5f4d5ad114115feac91e5ffc726c5a3423d8 (diff) | |
download | vyos-1x-8328e4393ad7cff4d2bd6291cd577048da270ccc.tar.gz vyos-1x-8328e4393ad7cff4d2bd6291cd577048da270ccc.zip |
Merge pull request #1775 from c-po/t4948-backport
pppoe: T4948: add CLI option to allow definition of host-uniq flag (equuleus backport)
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_pppoe.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_pppoe.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_pppoe.py b/smoketest/scripts/cli/test_interfaces_pppoe.py index 402fb4af5..8dcac4d7d 100755 --- a/smoketest/scripts/cli/test_interfaces_pppoe.py +++ b/smoketest/scripts/cli/test_interfaces_pppoe.py @@ -192,5 +192,37 @@ class PPPoEInterfaceTest(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + [interface, 'authentication', 'password', 'vyos']) self.cli_commit() + def test_pppoe_options(self): + # Check if PPPoE dialer can be configured with DHCPv6-PD + for interface in self._interfaces: + user = f'VyOS-user-{interface}' + passwd = f'VyOS-passwd-{interface}' + ac_name = f'AC{interface}' + service_name = f'SRV{interface}' + host_uniq = 'cafebeefBABE123456' + + self.cli_set(base_path + [interface, 'authentication', 'user', user]) + self.cli_set(base_path + [interface, 'authentication', 'password', passwd]) + self.cli_set(base_path + [interface, 'source-interface', self._source_interface]) + + self.cli_set(base_path + [interface, 'access-concentrator', ac_name]) + self.cli_set(base_path + [interface, 'service-name', service_name]) + self.cli_set(base_path + [interface, 'host-uniq', host_uniq]) + + # commit changes + self.cli_commit() + + for interface in self._interfaces: + ac_name = f'AC{interface}' + service_name = f'SRV{interface}' + host_uniq = 'cafebeefBABE123456' + + tmp = get_config_value(interface, 'rp_pppoe_ac')[1] + self.assertEqual(tmp, f'"{ac_name}"') + tmp = get_config_value(interface, 'rp_pppoe_service')[1] + self.assertEqual(tmp, f'"{service_name}"') + tmp = get_config_value(interface, 'host-uniq')[1] + self.assertEqual(tmp, f'"{host_uniq}"') + if __name__ == '__main__': unittest.main(verbosity=2) |