summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_protocols_bfd.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-10-14 17:37:42 +0200
committerChristian Breunig <christian@breunig.cc>2025-10-16 16:33:44 +0200
commit9775bb49e4d42c7bf09f4d78b404b5b39b47b11f (patch)
tree55caae9784be36945f86f6ab3d8a3bed6fea7847 /smoketest/scripts/cli/test_protocols_bfd.py
parent6961f7373fdec559f64a82dcb8c0b87d06f53e78 (diff)
downloadvyos-1x-9775bb49e4d42c7bf09f4d78b404b5b39b47b11f.tar.gz
vyos-1x-9775bb49e4d42c7bf09f4d78b404b5b39b47b11f.zip
frr: T7664: drop BASH/SED implementation in smoketest getFRRconfig()
Rathern then re-inventing the wheel by outself we import the frr-reload.py script and their read-in function of the current vtysh configuration.
Diffstat (limited to 'smoketest/scripts/cli/test_protocols_bfd.py')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bfd.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bfd.py b/smoketest/scripts/cli/test_protocols_bfd.py
index 611c6b605..46d33edf3 100755
--- a/smoketest/scripts/cli/test_protocols_bfd.py
+++ b/smoketest/scripts/cli/test_protocols_bfd.py
@@ -131,7 +131,7 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
self.cli_commit()
# Verify FRR bgpd configuration
- frrconfig = self.getFRRconfig('bfd', endsection='^exit')
+ frrconfig = self.getFRRconfig('bfd', stop_section='^exit')
for peer, peer_config in peers.items():
tmp = f'peer {peer}'
if 'multihop' in peer_config:
@@ -144,8 +144,9 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
tmp += f' vrf {peer_config["vrf"]}'
self.assertIn(tmp, frrconfig)
- peerconfig = self.getFRRconfig('bfd', endsection='^exit', substring=f' peer {peer}',
- endsubsection='^ exit')
+ peerconfig = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' peer {peer}',
+ stop_subsection='^ exit')
if 'echo_mode' in peer_config:
self.assertIn(f'echo-mode', peerconfig)
if 'intv_echo' in peer_config:
@@ -207,8 +208,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
# Verify FRR bgpd configuration
for profile, profile_config in profiles.items():
- config = self.getFRRconfig('bfd', endsection='^exit',
- substring=f' profile {profile}', endsubsection='^ exit',)
+ config = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' profile {profile}', stop_subsection='^ exit',)
if 'echo_mode' in profile_config:
self.assertIn(f' echo-mode', config)
if 'intv_echo' in profile_config:
@@ -230,8 +231,8 @@ class TestProtocolsBFD(VyOSUnitTestSHIM.TestCase):
self.assertNotIn(f'shutdown', config)
for peer, peer_config in peers.items():
- peerconfig = self.getFRRconfig('bfd', endsection='^exit',
- substring=f' peer {peer}', endsubsection='^ exit')
+ peerconfig = self.getFRRconfig('bfd', stop_section='^exit',
+ start_subsection=f' peer {peer}', stop_subsection='^ exit')
if 'profile' in peer_config:
self.assertIn(f' profile {peer_config["profile"]}', peerconfig)