From 23a7841901d5b7e46f00c628fc1a0946197b3c5b Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Wed, 6 May 2026 11:41:57 +0300 Subject: bgp: T8607: Add CLI support for BGP update-delay and establish-wait --- src/conf_mode/protocols_bgp.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index 24e244bb9..53561a9a3 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -478,6 +478,20 @@ def verify(config_dict): if not {'idle', 'interval', 'probes'} <= set(bgp['parameters']['tcp_keepalive']): raise ConfigError('TCP keepalive incomplete - idle, keepalive and probes must be set') + # Validate BGP update-delay: 'establish-wait' requires 'max-delay' and must not exceed it + if dict_search('parameters.update_delay', bgp) != None: + update_delay = dict_search('parameters.update_delay.max_delay', bgp) + establish_wait = dict_search('parameters.update_delay.establish_wait', bgp) + if establish_wait is not None: + if update_delay is None: + raise ConfigError( + 'BGP update-delay establish-wait requires max-delay to be set!' + ) + if int(establish_wait) > int(update_delay): + raise ConfigError( + 'BGP update-delay establish-wait cannot be greater than max-delay!' + ) + # Address Family specific validation if 'address_family' in bgp: for afi, afi_config in bgp['address_family'].items(): -- cgit v1.2.3