From c5af4d398a77aafc743579f68603f4e30ff1bc20 Mon Sep 17 00:00:00 2001 From: fett0 Date: Fri, 21 Apr 2023 18:07:16 +0000 Subject: static: T5161: add BFD monitoring for static routes --- smoketest/scripts/cli/test_protocols_static.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'smoketest') diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py index 706663ce5..c21dfc8be 100755 --- a/smoketest/scripts/cli/test_protocols_static.py +++ b/smoketest/scripts/cli/test_protocols_static.py @@ -31,6 +31,8 @@ routes = { '192.0.2.100' : { 'distance' : '100' }, '192.0.2.110' : { 'distance' : '110', 'interface' : 'eth0' }, '192.0.2.120' : { 'distance' : '120', 'disable' : '' }, + '192.0.2.130' : { 'bfd' : '' }, + '192.0.2.140' : { 'bfd_source' : '192.0.2.10' }, }, 'interface' : { 'eth0' : { 'distance' : '130' }, @@ -117,6 +119,7 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): self.cli_commit() def test_01_static(self): + bfd_profile = 'vyos-test' for route, route_config in routes.items(): route_type = 'route' if is_ipv6(route): @@ -133,6 +136,10 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): self.cli_set(base + ['next-hop', next_hop, 'interface', next_hop_config['interface']]) if 'vrf' in next_hop_config: self.cli_set(base + ['next-hop', next_hop, 'vrf', next_hop_config['vrf']]) + if 'bfd' in next_hop_config: + self.cli_set(base + ['next-hop', next_hop, 'bfd', 'profile', bfd_profile ]) + if 'bfd_source' in next_hop_config: + self.cli_set(base + ['next-hop', next_hop, 'bfd', 'multi-hop','source', next_hop_config['bfd_source'], 'profile', bfd_profile]) if 'interface' in route_config: @@ -187,6 +194,10 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): tmp += ' ' + next_hop_config['distance'] if 'vrf' in next_hop_config: tmp += ' nexthop-vrf ' + next_hop_config['vrf'] + if 'bfd' in next_hop_config: + tmp += ' bfd profile ' + bfd_profile + if 'bfd_source' in next_hop_config: + tmp += ' bfd multi-hop source ' + next_hop_config['bfd_source'] + 'profile' + bfd_profile if 'disable' in next_hop_config: self.assertNotIn(tmp, frrconfig) -- cgit v1.2.3 From 8f3c9b4a803f5e5c7baa60ecc21a24c57eefc70b Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 29 Apr 2023 08:15:37 +0200 Subject: smoketest: T5161: add missing whitespace in BFD profile during validation --- smoketest/scripts/cli/test_protocols_static.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'smoketest') diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py index c21dfc8be..fbf336f1a 100755 --- a/smoketest/scripts/cli/test_protocols_static.py +++ b/smoketest/scripts/cli/test_protocols_static.py @@ -139,7 +139,7 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): if 'bfd' in next_hop_config: self.cli_set(base + ['next-hop', next_hop, 'bfd', 'profile', bfd_profile ]) if 'bfd_source' in next_hop_config: - self.cli_set(base + ['next-hop', next_hop, 'bfd', 'multi-hop','source', next_hop_config['bfd_source'], 'profile', bfd_profile]) + self.cli_set(base + ['next-hop', next_hop, 'bfd', 'multi-hop', 'source', next_hop_config['bfd_source'], 'profile', bfd_profile]) if 'interface' in route_config: @@ -197,7 +197,7 @@ class TestProtocolsStatic(VyOSUnitTestSHIM.TestCase): if 'bfd' in next_hop_config: tmp += ' bfd profile ' + bfd_profile if 'bfd_source' in next_hop_config: - tmp += ' bfd multi-hop source ' + next_hop_config['bfd_source'] + 'profile' + bfd_profile + tmp += ' bfd multi-hop source ' + next_hop_config['bfd_source'] + ' profile ' + bfd_profile if 'disable' in next_hop_config: self.assertNotIn(tmp, frrconfig) -- cgit v1.2.3 From 98a072a8d8d95a8a15353b0b771d1724a5520353 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 29 Apr 2023 08:20:13 +0200 Subject: smoketest: T5161: add IPv6 static route BFD tests --- smoketest/scripts/cli/test_protocols_static.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'smoketest') diff --git a/smoketest/scripts/cli/test_protocols_static.py b/smoketest/scripts/cli/test_protocols_static.py index fbf336f1a..275f1a1df 100755 --- a/smoketest/scripts/cli/test_protocols_static.py +++ b/smoketest/scripts/cli/test_protocols_static.py @@ -69,6 +69,8 @@ routes = { '2001:db8::1' : { 'distance' : '10' }, '2001:db8::2' : { 'distance' : '20', 'interface' : 'eth0' }, '2001:db8::3' : { 'distance' : '30', 'disable' : '' }, + '2001:db8::4' : { 'bfd' : '' }, + '2001:db8::5' : { 'bfd_source' : '2001:db8::ffff' }, }, 'interface' : { 'eth0' : { 'distance' : '40', 'vrf' : 'black' }, -- cgit v1.2.3