From e60d65e02f94deb9741bdd3d7f6621a79bf81fcf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 24 May 2021 18:42:58 +0200 Subject: smoketest: isis: T3576: add testcase for default route origination This is the smoketest for the implementation added in commit 9682337c ("isis: T3576: support metric and route-map when originating a default route"). --- smoketest/scripts/cli/test_protocols_isis.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index bf8b0918c..a5150178a 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -136,5 +136,28 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.cli_delete(['policy', 'route-map', route_map]) + def test_isis_04_default_information(self): + metric = '50' + route_map = 'default-foo-' + + self.isis_base_config() + for afi in ['ipv4', 'ipv6']: + for level in ['level-1', 'level-2']: + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'always']) + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'metric', metric]) + self.cli_set(base_path + ['default-information', 'originate', afi, level, 'route-map', route_map + level + afi]) + + # Commit all changes + self.cli_commit() + + # Verify all changes + tmp = self.getFRRconfig(f'router isis {domain}') + self.assertIn(f' net {net}', tmp) + + for afi in ['ipv4', 'ipv6']: + for level in ['level-1', 'level-2']: + route_map_name = route_map + level + afi + self.assertIn(f' default-information originate {afi} {level} always route-map {route_map_name} metric {metric}', tmp) + if __name__ == '__main__': unittest.main(verbosity=2) -- cgit v1.2.3