summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_ipoe-server.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-17 06:35:51 +0100
committerGitHub <noreply@github.com>2024-01-17 06:35:51 +0100
commit0afa8dd813195b43f7ac3c9f0c11fdc8dae31668 (patch)
treeb84cfe5737e6342a993444b64f7e201814dfda79 /smoketest/scripts/cli/test_service_ipoe-server.py
parentbf08f0f2538b5068ff1a41b51dac832b04a7d4be (diff)
parentd187803c31175e471397dd4f77040ab56d2e1073 (diff)
downloadvyos-1x-0afa8dd813195b43f7ac3c9f0c11fdc8dae31668.tar.gz
vyos-1x-0afa8dd813195b43f7ac3c9f0c11fdc8dae31668.zip
Merge pull request #2832 from aapostoliuk/T5865-circinus
T5865: Moved ipv6 pools to named ipv6 pools in accel-ppp
Diffstat (limited to 'smoketest/scripts/cli/test_service_ipoe-server.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_ipoe-server.py41
1 files changed, 40 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_service_ipoe-server.py b/smoketest/scripts/cli/test_service_ipoe-server.py
index 6e95b3bd1..cec6adb09 100755
--- a/smoketest/scripts/cli/test_service_ipoe-server.py
+++ b/smoketest/scripts/cli/test_service_ipoe-server.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2022-2023 VyOS maintainers and contributors
+# Copyright (C) 2022-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -188,6 +188,45 @@ gw-ip-address={third_gateway.split('/')[0]}
{first_subnet},name={first_pool},next={second_pool}"""
self.assertIn(pool_config, config)
+ def test_accel_ipv6_pool(self):
+ # Test configuration of IPv6 client pools
+ self.basic_config(is_gateway=False, is_client_pool=False)
+
+ pool_name = 'ipv6_test_pool'
+ prefix_1 = '2001:db8:fffe::/56'
+ prefix_mask = '64'
+ prefix_2 = '2001:db8:ffff::/56'
+ client_prefix_1 = f'{prefix_1},{prefix_mask}'
+ client_prefix_2 = f'{prefix_2},{prefix_mask}'
+ self.set(['client-ipv6-pool', pool_name, 'prefix', prefix_1, 'mask',
+ prefix_mask])
+ self.set(['client-ipv6-pool', pool_name, 'prefix', prefix_2, 'mask',
+ prefix_mask])
+
+ delegate_1_prefix = '2001:db8:fff1::/56'
+ delegate_2_prefix = '2001:db8:fff2::/56'
+ delegate_mask = '64'
+ self.set(['client-ipv6-pool', pool_name, 'delegate', delegate_1_prefix,
+ 'delegation-prefix', delegate_mask])
+ self.set(['client-ipv6-pool', pool_name, 'delegate', delegate_2_prefix,
+ 'delegation-prefix', delegate_mask])
+
+ # commit changes
+ self.cli_commit()
+
+ # Validate configuration values
+ conf = ConfigParser(allow_no_value=True, delimiters='=', strict=False)
+ conf.read(self._config_file)
+
+ for tmp in ['ipv6pool', 'ipv6_nd', 'ipv6_dhcp']:
+ self.assertEqual(conf['modules'][tmp], None)
+
+ config = self.getConfig("ipv6-pool")
+ pool_config = f"""{client_prefix_1},name={pool_name}
+{client_prefix_2},name={pool_name}
+delegate={delegate_1_prefix},{delegate_mask},name={pool_name}
+delegate={delegate_2_prefix},{delegate_mask},name={pool_name}"""
+ self.assertIn(pool_config, config)
if __name__ == "__main__":
unittest.main(verbosity=2)