summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-01 11:23:27 +0200
committerChristian Poessinger <christian@poessinger.com>2022-07-01 11:27:15 +0200
commit6a7dac91c1a2a9bc8731ab04701336ced1e46d5d (patch)
treecb617526d1f6f8e0c56f73d9ff7c7d10d81bb05c
parent4cd30acbef4cedd19d94a5acd681e5a084787f07 (diff)
downloadvyos-1x-6a7dac91c1a2a9bc8731ab04701336ced1e46d5d.tar.gz
vyos-1x-6a7dac91c1a2a9bc8731ab04701336ced1e46d5d.zip
bgp: T4490: use common vyos.base.Warning() wrapper
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index aa77850a9..01f14df61 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -19,6 +19,7 @@ import os
from sys import exit
from sys import argv
+from vyos.base import Warning
from vyos.config import Config
from vyos.configdict import dict_merge
from vyos.configverify import verify_prefix_list
@@ -199,7 +200,7 @@ def verify(bgp):
raise ConfigError(f'"source-interface" option not allowed for neighbor "{peer}"')
if 'address_family' not in peer_config:
- print(f'Neighbor "{peer}" requires address-family!')
+ Warning(f'BGP neighbor "{peer}" requires address-family!')
for afi in ['ipv4_unicast', 'ipv4_multicast', 'ipv4_labeled_unicast', 'ipv4_flowspec',
'ipv6_unicast', 'ipv6_multicast', 'ipv6_labeled_unicast', 'ipv6_flowspec',