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

[yang] bgp address family l2vpn advertise-all-vni #21054

Open
wants to merge 4 commits 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
3 changes: 3 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,9 @@
"default|ipv6_unicast": {
"max_ebgp_paths": "2",
"max_ibgp_paths": "2"
},
"default|l2vpn_evpn": {
"advertise-all-vni": "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 @@ -2,6 +2,16 @@
"BGP_GLOBAL_VALID": {
"desc": "Configure BGP global table."
},
"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_TRUE": {
"desc": "BGP Address Family l2vpn_evpn with advertise-all-vni set to true"
},
"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_FALSE": {
"desc": "BGP Address Family l2vpn_evpn with advertise-all-vni set to false"
},
"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_INVALID": {
"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_NEIGHBOR_ALL_VALID": {
"desc": "Configure BGP neighbor table."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,69 @@
}
}
},

"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_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-all-vni": "true"
}
]
}
}
},
"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_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-all-vni": "false"
}
]
}
}
},
"BGP_GLOBALS_AF_ADVERTISE_ALL_VNI_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-all-vni": "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 @@ -445,6 +445,11 @@ module sonic-bgp-global {
}
description "Maximum duration to suppress a stable route";
}

leaf advertise-all-vni {
bradh352 marked this conversation as resolved.
Show resolved Hide resolved
type boolean;
description "L2VPN advertise all VNIs";
}
}
}

Expand Down
Loading