summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-10-06 10:48:33 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-10-06 10:48:33 -0500
commitb0102e5344999546dd3999571ef51f6a2e399b61 (patch)
tree2222ec7fb1ff8e5eedcf48b0889bc0354a3776a1 /src
parent7bffb45f931f91416000a483c77e6749ced71206 (diff)
downloadvyos-1x-b0102e5344999546dd3999571ef51f6a2e399b61.tar.gz
vyos-1x-b0102e5344999546dd3999571ef51f6a2e399b61.zip
Revert "bgp: T7760: improfe verify() logic on default VRF removal"
This reverts commit 7da3fcc9b7306f2e241716aa26b518540f3e3471.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 696981012..4e7f09d0e 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -200,7 +200,7 @@ def verify(config_dict):
if 'dependent_vrfs' in bgp:
for vrf, vrf_options in bgp['dependent_vrfs'].items():
if vrf != 'default':
- if 'protocols' in vrf_options and 'bgp' in vrf_options['protocols']:
+ if dict_search('protocols.bgp', vrf_options):
dependent_vrfs = ', '.join(bgp['dependent_vrfs'].keys())
raise ConfigError(f'Cannot delete default BGP instance, ' \
f'dependent VRF instance(s): {dependent_vrfs}')
@@ -343,7 +343,7 @@ def verify(config_dict):
peer_group = peer_config['interface']['v6only']['peer_group']
if 'remote_as' in peer_config['interface']['v6only'] and 'remote_as' in bgp['peer_group'][peer_group]:
raise ConfigError(f'Peer-group member "{peer}" cannot override remote-as of peer-group "{peer_group}"!')
-
+
for afi in ['ipv4_unicast', 'ipv4_multicast', 'ipv4_labeled_unicast', 'ipv4_flowspec',
'ipv6_unicast', 'ipv6_multicast', 'ipv6_labeled_unicast', 'ipv6_flowspec',
'l2vpn_evpn']: