Add bgp_device_global yang model (#11343)
This commit is contained in:
parent
a380105461
commit
054db00771
@ -9,6 +9,7 @@ Table of Contents
|
|||||||
* [Incremental Configuration](#incremental-configuration)
|
* [Incremental Configuration](#incremental-configuration)
|
||||||
* [<strong>Redis and Json Schema</strong>](#redis-and-json-schema)
|
* [<strong>Redis and Json Schema</strong>](#redis-and-json-schema)
|
||||||
* [ACL and Mirroring](#acl-and-mirroring)
|
* [ACL and Mirroring](#acl-and-mirroring)
|
||||||
|
* [BGP Device Global](#bgp-device-global)
|
||||||
* [BGP Sessions](#bgp-sessions)
|
* [BGP Sessions](#bgp-sessions)
|
||||||
* [BUFFER_PG](#buffer_pg)
|
* [BUFFER_PG](#buffer_pg)
|
||||||
* [Buffer pool](#buffer-pool)
|
* [Buffer pool](#buffer-pool)
|
||||||
@ -335,7 +336,21 @@ and migration plan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### BGP Device Global
|
||||||
|
|
||||||
|
The **BGP_DEVICE_GLOBAL** table contains device-level BGP global state.
|
||||||
|
It has a STATE object containing device state like **tsa_enabled**
|
||||||
|
which is set to true if device is currently isolated using
|
||||||
|
traffic-shift-away (TSA) route-maps in BGP
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE": {
|
||||||
|
"tsa_enabled": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
### BGP Sessions
|
### BGP Sessions
|
||||||
|
|
||||||
BGP session configuration is defined in **BGP_NEIGHBOR** table. BGP
|
BGP session configuration is defined in **BGP_NEIGHBOR** table. BGP
|
||||||
|
@ -80,6 +80,7 @@ setup(
|
|||||||
('yang-models', ['./yang-models/sonic-acl.yang',
|
('yang-models', ['./yang-models/sonic-acl.yang',
|
||||||
'./yang-models/sonic-auto_techsupport.yang',
|
'./yang-models/sonic-auto_techsupport.yang',
|
||||||
'./yang-models/sonic-bgp-common.yang',
|
'./yang-models/sonic-bgp-common.yang',
|
||||||
|
'./yang-models/sonic-bgp-device-global.yang',
|
||||||
'./yang-models/sonic-bgp-global.yang',
|
'./yang-models/sonic-bgp-global.yang',
|
||||||
'./yang-models/sonic-bgp-monitor.yang',
|
'./yang-models/sonic-bgp-monitor.yang',
|
||||||
'./yang-models/sonic-bgp-internal-neighbor.yang',
|
'./yang-models/sonic-bgp-internal-neighbor.yang',
|
||||||
|
@ -1305,6 +1305,11 @@
|
|||||||
"default|ipv4_unicast|21.0.0.0/8": {
|
"default|ipv4_unicast|21.0.0.0/8": {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE": {
|
||||||
|
"tsa_enabled": "false"
|
||||||
|
}
|
||||||
|
},
|
||||||
"BGP_PEER_RANGE": {
|
"BGP_PEER_RANGE": {
|
||||||
"BGPSLBPassive": {
|
"BGPSLBPassive": {
|
||||||
"ip_range": [
|
"ip_range": [
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_DEFAULT_VALUES": {
|
||||||
|
"desc": "Load bgp device global table with fields set to default values"
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_TSA_TEST": {
|
||||||
|
"desc": "Load bgp device global table with tsa_enabled set to true"
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_TSB_TEST": {
|
||||||
|
"desc": "Load bgp device global table with tsa_enabled set to false"
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_INVALID_VALUE": {
|
||||||
|
"desc": "Load bgp device global table with invalid value",
|
||||||
|
"eStrKey": "InvalidValue",
|
||||||
|
"eStr": ["tsa_enabled"]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_DEFAULT_VALUES": {
|
||||||
|
"sonic-bgp-device-global:sonic-bgp-device-global": {
|
||||||
|
"sonic-bgp-device-global:BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE":{
|
||||||
|
"tsa_enabled": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_TSA_TEST": {
|
||||||
|
"sonic-bgp-device-global:sonic-bgp-device-global": {
|
||||||
|
"sonic-bgp-device-global:BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE":{
|
||||||
|
"tsa_enabled": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_TSB_TEST": {
|
||||||
|
"sonic-bgp-device-global:sonic-bgp-device-global": {
|
||||||
|
"sonic-bgp-device-global:BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE":{
|
||||||
|
"tsa_enabled": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BGP_DEVICE_GLOBAL_WITH_INVALID_VALUE": {
|
||||||
|
"sonic-bgp-device-global:sonic-bgp-device-global": {
|
||||||
|
"sonic-bgp-device-global:BGP_DEVICE_GLOBAL": {
|
||||||
|
"STATE":{
|
||||||
|
"tsa_enabled": "FALSE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
module sonic-bgp-device-global {
|
||||||
|
namespace "http://github.com/Azure/sonic-bgp-device-global";
|
||||||
|
prefix bgp_device_global;
|
||||||
|
yang-version 1.1;
|
||||||
|
|
||||||
|
organization
|
||||||
|
"SONiC";
|
||||||
|
|
||||||
|
contact
|
||||||
|
"SONiC";
|
||||||
|
|
||||||
|
description
|
||||||
|
"SONIC Device-specific BGP global data";
|
||||||
|
|
||||||
|
revision 2022-06-26 {
|
||||||
|
description
|
||||||
|
"Initial revision";
|
||||||
|
}
|
||||||
|
|
||||||
|
container sonic-bgp-device-global {
|
||||||
|
container BGP_DEVICE_GLOBAL {
|
||||||
|
container STATE {
|
||||||
|
description "BGP device-specific global data";
|
||||||
|
leaf tsa_enabled {
|
||||||
|
type boolean;
|
||||||
|
default "false";
|
||||||
|
description
|
||||||
|
"When set to true, Traffic is shifted away (TSA), i.e, BGP routes are not advertised to neighboring routers";
|
||||||
|
}
|
||||||
|
} /* end of STATE container */
|
||||||
|
} /* end of BGP_DEVICE_GLOBAL container */
|
||||||
|
|
||||||
|
} /* end of top level container */
|
||||||
|
|
||||||
|
} /* end of module sonic-bgp-device-global */
|
||||||
|
|
Reference in New Issue
Block a user