From 3baba6b477409163fd3520dd8bf806790d4edd6e Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 24 Aug 2023 15:55:16 +0200 Subject: system: T5505: fix zebra route-map is not removed from FRR Configuring "set system ip protocol ospf|bgp route-map foo" and commit it installs the route-map into FRR. Removing the CLI configuration "delete system ip protocol" does not remove the route-map from FRR - it stays active. This commit adds the fix and appropriate smoketests extenstion. --- smoketest/scripts/cli/test_system_ip.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'smoketest/scripts/cli/test_system_ip.py') diff --git a/smoketest/scripts/cli/test_system_ip.py b/smoketest/scripts/cli/test_system_ip.py index bd2531084..567416774 100755 --- a/smoketest/scripts/cli/test_system_ip.py +++ b/smoketest/scripts/cli/test_system_ip.py @@ -98,6 +98,16 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase): for protocol in protocols: self.assertIn(f'ip protocol {protocol} route-map route-map-{protocol}', frrconfig) + # Delete route-maps + self.cli_delete(['policy', 'route-map']) + self.cli_delete(base_path + ['protocol']) + + self.cli_commit() + + # Verify route-map properly applied to FRR + frrconfig = self.getFRRconfig('ip protocol', end='', daemon='zebra') + self.assertNotIn(f'ip protocol', frrconfig) + def test_system_ip_protocol_non_existing_route_map(self): non_existing = 'non-existing' self.cli_set(base_path + ['protocol', 'static', 'route-map', non_existing]) @@ -106,6 +116,7 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase): with self.assertRaises(ConfigSessionError): self.cli_commit() self.cli_set(['policy', 'route-map', non_existing, 'rule', '10', 'action', 'deny']) + # Commit again self.cli_commit() -- cgit v1.2.3