summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-14 17:26:02 +0100
committerGitHub <noreply@github.com>2023-12-14 17:26:02 +0100
commit4508fb22454e430fbd2040f37bdb75dbc4f6f68a (patch)
tree2ec829c0ee1f2d6879c64a105619e0cae26c5dd6 /src
parent9f72aff65e0589b9387227f69a25545eba5ba4f5 (diff)
parent5523fccf4f7d05444c36c568128e94cd7b08c34f (diff)
downloadvyos-1x-4508fb22454e430fbd2040f37bdb75dbc4f6f68a.tar.gz
vyos-1x-4508fb22454e430fbd2040f37bdb75dbc4f6f68a.zip
Merge pull request #2627 from sever-sever/T4163
T4163: Add BGP Monitoring Protocol BMP feature
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 557f0a9e9..5a503a9b7 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -30,6 +30,7 @@ from vyos.template import render_to_string
from vyos.utils.dict import dict_search
from vyos.utils.network import get_interface_vrf
from vyos.utils.network import is_addr_assigned
+from vyos.utils.process import process_named_running
from vyos import ConfigError
from vyos import frr
from vyos import airbag
@@ -247,6 +248,19 @@ def verify(bgp):
if 'system_as' not in bgp:
raise ConfigError('BGP system-as number must be defined!')
+ # Verify BMP
+ if 'bmp' in bgp:
+ # check bmp flag "bgpd -d -F traditional --daemon -A 127.0.0.1 -M rpki -M bmp"
+ if not process_named_running('bgpd', 'bmp'):
+ raise ConfigError(
+ f'"bmp" flag is not found in bgpd. Configure "set system frr bmp" and restart bgp process'
+ )
+ # check bmp target
+ if 'target' in bgp['bmp']:
+ for target, target_config in bgp['bmp']['target'].items():
+ if 'address' not in target_config:
+ raise ConfigError(f'BMP target "{target}" address must be defined!')
+
# Verify vrf on interface and bgp section
if 'interface' in bgp:
for interface in bgp['interface']: