summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorfett0 <fernando.gmaidana@gmail.com>2022-03-19 18:50:03 +0000
committerfett0 <fernando.gmaidana@gmail.com>2022-03-19 18:50:03 +0000
commit496d2a5fd8c3bcbd0e7102c88eaf66d432cbb678 (patch)
tree98d2124e9981d1ef73548414c07b363cf2be7e1d /smoketest
parent91d19038f9e31657e660a88cbfc1443e454177ef (diff)
downloadvyos-1x-496d2a5fd8c3bcbd0e7102c88eaf66d432cbb678.tar.gz
vyos-1x-496d2a5fd8c3bcbd0e7102c88eaf66d432cbb678.zip
smoketest: Verify export-list rule to ospf-area
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_ospf.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py
index ee58b0fe2..5d8e9cff2 100755
--- a/smoketest/scripts/cli/test_protocols_ospf.py
+++ b/smoketest/scripts/cli/test_protocols_ospf.py
@@ -368,6 +368,30 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase):
self.cli_delete(['vrf', 'name', vrf])
self.cli_delete(['interfaces', 'ethernet', vrf_iface, 'vrf'])
+ def test_ospf_13_export_list(self):
+ # Verify explort-list works on ospf-area
+ acl = '100'
+ seq = '10'
+ area = '0.0.0.10'
+ network = '10.0.0.0/8'
+
+
+ self.cli_set(['policy', 'access-list', acl, 'rule', seq, 'action', 'permit'])
+ self.cli_set(['policy', 'access-list', acl, 'rule', seq, 'source', 'any'])
+ self.cli_set(['policy', 'access-list', acl, 'rule', seq, 'destination', 'any'])
+ self.cli_set(base_path + ['area', area, 'network', network])
+ self.cli_set(base_path + ['area', area, 'export-list', acl])
+
+ # commit changes
+ self.cli_commit()
+
+ # Verify FRR ospfd configuration
+ frrconfig = self.getFRRconfig('router ospf')
+ self.assertIn(f'router ospf', frrconfig)
+ self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) # default
+ self.assertIn(f' network {network} area {area}', frrconfig)
+ self.assertIn(f' area {area} export-list {acl}', frrconfig)
+
if __name__ == '__main__':
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
unittest.main(verbosity=2)