Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frr-mgmt-framework]: VXLAN EVPN should support advertise-svi-ip #21336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sonic-frr-mgmt-framework/frrcfgd/frrcfgd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,7 @@ class BGPConfigDaemon:
'+route_flap_dampen_suppress_threshold',
'+route_flap_dampen_max_suppress'], '{no:no-prefix}bgp dampening {} {} {} {}', ['true', 'false']),
('advertise-all-vni', '{no:no-prefix}advertise-all-vni', ['true','false']),
('advertise-svi-ip', '{no:no-prefix}advertise-svi-ip', ['true','false']),
('advertise-default-gw', '{no:no-prefix}advertise-default-gw', ['true','false']),
('advertise-ipv4-unicast', '{no:no-prefix}advertise ipv4 unicast', ['true','false']),
('advertise-ipv6-unicast', '{no:no-prefix}advertise ipv6 unicast', ['true','false']),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% if 'advertise-all-vni' in af_val and af_val['advertise-all-vni'] == 'true' %}
advertise-all-vni
{% endif %}
{% if 'advertise-svi-ip' in af_val and af_val['advertise-svi-ip'] == 'true' %}
advertise-svi-ip
{% endif %}
{% if 'autort' in af_val %}
autort {{af_val['autort']}}
{% endif %}
Expand Down Expand Up @@ -75,4 +78,4 @@
exit-vni
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
2 changes: 2 additions & 0 deletions src/sonic-frr-mgmt-framework/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def hdl_confed_peers_cmd(is_del, cmd_list, chk_data):
conf_bgp_af_cmd('default', 100, 'ipv4') + ['{}distance bgp 100 115 238']),
CmdMapTestInfo('BGP_GLOBALS_AF', 'default|ipv6_unicast', {'advertise-all-vni': 'true'},
conf_bgp_af_cmd('default', 100, 'ipv6') + ['{}advertise-all-vni']),
CmdMapTestInfo('BGP_GLOBALS_AF', 'default|ipv6_unicast', {'advertise-svi-ip': 'true'},
conf_bgp_af_cmd('default', 100, 'ipv6') + ['{}advertise-svi-ip']),
CmdMapTestInfo('BGP_GLOBALS', 'Vrf_red', {'local_asn': 200},
conf_bgp_dft_cmd('Vrf_red', 200), False, conf_no_bgp_cmd('Vrf_red', 200), None, None, None),
CmdMapTestInfo('BGP_GLOBALS', 'Vrf_red', {'med_confed': 'true'},
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,8 @@
"max_ibgp_paths": "2"
},
"default|l2vpn_evpn": {
"advertise-all-vni": "true"
"advertise-all-vni": "true",
"advertise-svi-ip": "true"
}
},
"BGP_GLOBALS_AF_AGGREGATE_ADDR": {
Expand Down
10 changes: 10 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/bgp.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"desc": "BGP Address Family l2vpn_evpn with advertise-all-vni set to an invalid value",
"eStr": "Invalid value \"invalid value\" in \"advertise-all-vni\" element."
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_TRUE": {
"desc": "BGP Address Family l2vpn_evpn with advertise-svi-ip set to true"
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_FALSE": {
"desc": "BGP Address Family l2vpn_evpn with advertise-svi-ip set to false"
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_INVALID": {
"desc": "BGP Address Family l2vpn_evpn with advertise-svi-ip set to an invalid value",
"eStr": "Invalid value \"invalid value\" in \"advertise-svi-ip\" element."
},
"BGP_NEIGHBOR_ALL_VALID": {
"desc": "Configure BGP neighbor table."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,69 @@
}
}
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_TRUE": {
"sonic-bgp-global:sonic-bgp-global": {
"sonic-bgp-global:BGP_GLOBALS": {
"BGP_GLOBALS_LIST": [
{
"vrf_name":"default",
"local_asn": 65001
}
]
},
"sonic-bgp-global:BGP_GLOBALS_AF": {
"BGP_GLOBALS_AF_LIST": [
{
"vrf_name": "default",
"afi_safi": "l2vpn_evpn",
"advertise-svi-ip": "true"
}
]
}
}
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_FALSE": {
"sonic-bgp-global:sonic-bgp-global": {
"sonic-bgp-global:BGP_GLOBALS": {
"BGP_GLOBALS_LIST": [
{
"vrf_name":"default",
"local_asn": 65001
}
]
},
"sonic-bgp-global:BGP_GLOBALS_AF": {
"BGP_GLOBALS_AF_LIST": [
{
"vrf_name": "default",
"afi_safi": "l2vpn_evpn",
"advertise-svi-ip": "false"
}
]
}
}
},
"BGP_GLOBALS_AF_ADVERTISE_SVI_IP_INVALID": {
"sonic-bgp-global:sonic-bgp-global": {
"sonic-bgp-global:BGP_GLOBALS": {
"BGP_GLOBALS_LIST": [
{
"vrf_name":"default",
"local_asn": 65001
}
]
},
"sonic-bgp-global:BGP_GLOBALS_AF": {
"BGP_GLOBALS_AF_LIST": [
{
"vrf_name": "default",
"afi_safi": "l2vpn_evpn",
"advertise-svi-ip": "invalid value"
}
]
}
}
},
"BGP_NEIGHBOR_ALL_VALID": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
Expand Down
5 changes: 5 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-bgp-global.yang
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ module sonic-bgp-global {
type boolean;
description "L2VPN advertise all VNIs";
}

leaf advertise-svi-ip {
type boolean;
description "L2VPN advertise the local SVI IP address so that it can be accessible from remote VTEPs";
}
}
}

Expand Down
Loading