From 6a7dac91c1a2a9bc8731ab04701336ced1e46d5d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 1 Jul 2022 11:23:27 +0200 Subject: bgp: T4490: use common vyos.base.Warning() wrapper --- src/conf_mode/protocols_bgp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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', -- cgit v1.2.3