From 6cffe2aa820461f7e1dd4c99ee070a7184ff36e8 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 28 Jun 2022 08:59:42 +0000 Subject: bgp: T4490: Add informational message for peer withour AFI As we don't use addresss-family ipv4-unicast by default we should to send informational message about AFI for peer is required --- src/conf_mode/protocols_bgp.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/conf_mode/protocols_bgp.py') diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index cd46cbcb4..aa77850a9 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -198,6 +198,9 @@ def verify(bgp): if 'source_interface' in peer_config['interface']: 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!') + for afi in ['ipv4_unicast', 'ipv4_multicast', 'ipv4_labeled_unicast', 'ipv4_flowspec', 'ipv6_unicast', 'ipv6_multicast', 'ipv6_labeled_unicast', 'ipv6_flowspec', 'l2vpn_evpn']: -- cgit v1.2.3