summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-05-11 20:27:41 +0200
committerGitHub <noreply@github.com>2026-05-11 20:27:41 +0200
commit86d13cb23df0e473c5e152fd050e136c228bfb1c (patch)
tree2150a4eea7e84ec476a70ef5e71d7845b6d72093 /smoketest/scripts/cli
parentd529fd96c6a2033bdacd1fd7552014a4659ebe44 (diff)
parent23a7841901d5b7e46f00c628fc1a0946197b3c5b (diff)
downloadvyos-1x-86d13cb23df0e473c5e152fd050e136c228bfb1c.tar.gz
vyos-1x-86d13cb23df0e473c5e152fd050e136c228bfb1c.zip
Merge pull request #5171 from natali-rs1985/T8607
bgp: T8607: Add CLI support for BGP update-delay and establish-wait
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 0179356d2..c2a6f3dd1 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -329,6 +329,8 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
tcp_keepalive_idle = '66'
tcp_keepalive_interval = '77'
tcp_keepalive_probes = '22'
+ max_delay = '120'
+ establish_wait = '60'
self.cli_set(base_path + ['parameters', 'allow-martian-nexthop'])
self.cli_set(base_path + ['parameters', 'disable-ebgp-connected-route-check'])
@@ -376,6 +378,21 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.cli_set(base_path + ['address-family', 'ipv6-unicast', 'maximum-paths', 'ebgp', max_path_v6])
self.cli_set(base_path + ['address-family', 'ipv6-unicast', 'maximum-paths', 'ibgp', max_path_v6ibgp])
+ # BGP update-delay
+ self.cli_set(
+ base_path + ['parameters', 'update-delay', 'establish-wait', '200']
+ )
+ # establish-wait should not be set without max-delay
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+ self.cli_set(base_path + ['parameters', 'update-delay', 'max-delay', max_delay])
+ # establish-wait should not be greater than max-delay
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+ self.cli_set(
+ base_path + ['parameters', 'update-delay', 'establish-wait', establish_wait]
+ )
+
# commit changes
self.cli_commit()
@@ -408,6 +425,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' bgp tcp-keepalive {tcp_keepalive_idle} {tcp_keepalive_interval} {tcp_keepalive_probes}', frrconfig)
self.assertNotIn(f'bgp ebgp-requires-policy', frrconfig)
self.assertIn(f' no bgp suppress-duplicates', frrconfig)
+ self.assertIn(f' update-delay {max_delay} {establish_wait}', frrconfig)
afiv4_config = self.getFRRconfig(f'router bgp {ASN}', stop_section='^exit',
start_subsection=' address-family ipv4 unicast',