diff --git a/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py b/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py index ef74754ceda6..c91d71b471e7 100755 --- a/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py +++ b/src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py @@ -1843,7 +1843,7 @@ class BGPConfigDaemon: cmn_key_map = [('asn&peer_type', '{no:no-prefix}neighbor {} remote-as {}'), (['local_asn', '+local_as_no_prepend', '+local_as_replace_as'], '{no:no-prefix}neighbor {} local-as {} {:no-prepend} {:replace-as}'), - (['admin_status', '+shutdown_message'], '{no:no-prefix}neighbor {} shutdown {:shutdown-msg}', ['false', 'true']), + (['admin_status', '+shutdown_message'], '{no:no-prefix}neighbor {} shutdown {:shutdown-msg}', ['down', 'up']), ('local_addr', '{no:no-prefix}neighbor {} update-source {}'), ('name', '{no:no-prefix}neighbor {} description {}'), (['ebgp_multihop', '+ebgp_multihop_ttl'],'{no:no-prefix}neighbor {} ebgp-multihop {}', ['true', 'false']), @@ -1870,9 +1870,9 @@ class BGPConfigDaemon: nbr_key_map = [('peer_group_name', '{no:no-prefix}neighbor {} peer-group {}')] nbr_af_key_map = [(['allow_as_in', '+allow_as_count&allow_as_origin'], '{no:no-prefix}neighbor {} allowas-in {:allow-as-in}', ['true', 'false']), - ('admin_status|ipv4', '{no:no-prefix}neighbor {} activate', ['true', 'false', False]), - ('admin_status|ipv6', '{no:no-prefix}neighbor {} activate', ['true', 'false', False]), - ('admin_status|l2vpn', '{no:no-prefix}neighbor {} activate', ['true', 'false', False]), + ('admin_status|ipv4', '{no:no-prefix}neighbor {} activate', ['up', 'down', False]), + ('admin_status|ipv6', '{no:no-prefix}neighbor {} activate', ['up', 'down', False]), + ('admin_status|l2vpn', '{no:no-prefix}neighbor {} activate', ['up', 'down', False]), (['send_default_route', '+default_rmap'], '{no:no-prefix}neighbor {} default-originate {:default-rmap}', ['true', 'false']), ('default_rmap', '{no:no-prefix}neighbor {} default-originate route-map {}'), (['max_prefix_limit', '++max_prefix_warning_threshold', diff --git a/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_af.j2 b/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_af.j2 index 8afb64e991cc..21a413b70203 100644 --- a/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_af.j2 +++ b/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_af.j2 @@ -2,7 +2,7 @@ {# this is called with the "vrf" and "address-family matched #} {# ------------------------------------------------------------ #} {% if 'admin_status' in n_af_val %} -{% if n_af_val['admin_status'] == 'true' %} +{% if n_af_val['admin_status'] == 'up' or n_af_val['admin_status'] == 'true' %} neighbor {{nbr_name}} activate {% else %} no neighbor {{nbr_name}} activate diff --git a/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_or_peer.j2 b/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_or_peer.j2 index 8fc5e061ad56..553e672b5fc6 100644 --- a/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_or_peer.j2 +++ b/src/sonic-frr-mgmt-framework/templates/bgpd/bgpd.conf.db.nbr_or_peer.j2 @@ -30,7 +30,7 @@ {% if 'name' in nbr_or_peer %} neighbor {{name_or_ip}} description {{nbr_or_peer['name']}} {% endif %} -{% if 'admin_status' in nbr_or_peer and nbr_or_peer['admin_status'] == 'false' %} +{% if 'admin_status' in nbr_or_peer and (nbr_or_peer['admin_status'] == 'down' or nbr_or_peer['admin_status'] == 'false') %} {% if 'shutdown_message' in nbr_or_peer %} neighbor {{name_or_ip}} shutdown message {{nbr_or_peer['shutdown_message']}} {% else %}