summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_service_pppoe-server.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-13 17:38:16 +0100
committerGitHub <noreply@github.com>2023-02-13 17:38:16 +0100
commit5e56daaff4ec53a387abbd3ad879e916a2bfa373 (patch)
tree3a9a3d1823e01287c52a38cc67c0b7061bc901ce /smoketest/scripts/cli/test_service_pppoe-server.py
parent9c481b00cae8ed1d121c809fb5edc24a937525e9 (diff)
parente7e81746e6ad01ce644cd7b584233464f91d9380 (diff)
downloadvyos-1x-5e56daaff4ec53a387abbd3ad879e916a2bfa373.tar.gz
vyos-1x-5e56daaff4ec53a387abbd3ad879e916a2bfa373.zip
Merge pull request #1813 from sever-sever/T4971-eq
T4971: PPPoE server add named ip pool and attr Framed-Pool
Diffstat (limited to 'smoketest/scripts/cli/test_service_pppoe-server.py')
-rwxr-xr-xsmoketest/scripts/cli/test_service_pppoe-server.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_pppoe-server.py b/smoketest/scripts/cli/test_service_pppoe-server.py
index e5acff265..8514801a8 100755
--- a/smoketest/scripts/cli/test_service_pppoe-server.py
+++ b/smoketest/scripts/cli/test_service_pppoe-server.py
@@ -175,6 +175,35 @@ class TestServicePPPoEServer(BasicAccelPPPTest.TestCase):
self.assertTrue(process_named_running(self._process_name))
+ def test_pppoe_server_client_ip_pool_name(self):
+ # Test configuration of named client pools
+ self.basic_config()
+
+ subnet = '192.0.2.0/24'
+ gateway = '192.0.2.1'
+ pool = 'VYOS'
+
+ subnet_name = f'{subnet},name'
+ gw_ip_prefix = f'{gateway}/24'
+
+ self.set(['client-ip-pool', 'name', pool, 'subnet', subnet])
+ self.set(['client-ip-pool', 'name', pool, 'gateway-address', gateway])
+ self.cli_delete(self._base_path + ['gateway-address'])
+
+ # commit changes
+ self.cli_commit()
+
+ # Validate configuration values
+ conf = ConfigParser(allow_no_value=True, delimiters='=')
+ conf.read(self._config_file)
+
+ # Validate configuration
+ self.assertEqual(conf['ip-pool'][subnet_name], pool)
+ self.assertEqual(conf['ip-pool']['gw-ip-address'], gateway)
+ self.assertEqual(conf['pppoe']['ip-pool'], pool)
+ self.assertEqual(conf['pppoe']['gw-ip-address'], gw_ip_prefix)
+
+
def test_pppoe_server_client_ipv6_pool(self):
# Test configuration of IPv6 client pools
self.basic_config()