[YANG] Enable Yang model for BGP_BBR config entry (#17622)
Why I did it Enable Yang model for BGP_BBR config entry. { "BGP_BBR": { "all": { "status": "enabled"/"disabled" } } } Work item tracking Microsoft ADO (number only): 25988660 How I did it Add yang model and ut for BGP_BBR. How to verify it Use GCU cmd to change bbr status. Create following json patch: disable_bbr.json-patch [ { "op": "replace", "path": "/BGP_BBR/all/status", "value": "disabled" } ] Run sudo config apply-patch ./disable_bbr.json-patch cmd on dut. Success.
This commit is contained in:
parent
a0e2082efd
commit
98c1f95a93
@ -7,9 +7,12 @@ Table of Contents
|
|||||||
* [Introduction](#introduction)
|
* [Introduction](#introduction)
|
||||||
* [Configuration](#configuration)
|
* [Configuration](#configuration)
|
||||||
* [<strong>Config Load and Save</strong>](#config-load-and-save)
|
* [<strong>Config Load and Save</strong>](#config-load-and-save)
|
||||||
|
|
||||||
* [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 BBR](#bgp-bbr)
|
||||||
* [BGP Device Global](#bgp-device-global)
|
* [BGP Device Global](#bgp-device-global)
|
||||||
* [BGP Sessions](#bgp-sessions)
|
* [BGP Sessions](#bgp-sessions)
|
||||||
* [BUFFER_PG](#buffer_pg)
|
* [BUFFER_PG](#buffer_pg)
|
||||||
@ -367,6 +370,18 @@ and migration plan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
### BGP BBR
|
||||||
|
|
||||||
|
The **BGP_BBR** table contains device-level BBR state.
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"BGP_BBR": {
|
||||||
|
"all": {
|
||||||
|
"status": "enabled"/"disabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
### BGP Device Global
|
### BGP Device Global
|
||||||
|
|
||||||
The **BGP_DEVICE_GLOBAL** table contains device-level BGP global state.
|
The **BGP_DEVICE_GLOBAL** table contains device-level BGP global state.
|
||||||
|
@ -85,6 +85,7 @@ setup(
|
|||||||
data_files=[
|
data_files=[
|
||||||
('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-bbr.yang',
|
||||||
'./yang-models/sonic-bgp-common.yang',
|
'./yang-models/sonic-bgp-common.yang',
|
||||||
'./yang-models/sonic-bgp-device-global.yang',
|
'./yang-models/sonic-bgp-device-global.yang',
|
||||||
'./yang-models/sonic-bgp-global.yang',
|
'./yang-models/sonic-bgp-global.yang',
|
||||||
|
@ -1597,6 +1597,11 @@
|
|||||||
"local_ip": "12.12.0.2"
|
"local_ip": "12.12.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"BGP_BBR": {
|
||||||
|
"all": {
|
||||||
|
"status": "enabled"
|
||||||
|
}
|
||||||
|
},
|
||||||
"BGP_GLOBALS": {
|
"BGP_GLOBALS": {
|
||||||
"default": {
|
"default": {
|
||||||
"router_id": "5.5.5.5",
|
"router_id": "5.5.5.5",
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"BGP_BBR_TABLE": {
|
||||||
|
"desc": "BGP BBR Table"
|
||||||
|
},
|
||||||
|
"BGP_BBR_INVALID_STATUS": {
|
||||||
|
"desc": "Configure status key with invalid value",
|
||||||
|
"eStrKey": "InvalidValue"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"BGP_BBR_TABLE": {
|
||||||
|
"sonic-bgp-bbr:sonic-bgp-bbr": {
|
||||||
|
"sonic-bgp-bbr:BGP_BBR": {
|
||||||
|
"all":
|
||||||
|
{
|
||||||
|
"status": "enabled"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BGP_BBR_INVALID_STATUS": {
|
||||||
|
"sonic-bgp-bbr:sonic-bgp-bbr": {
|
||||||
|
"sonic-bgp-bbr:BGP_BBR": {
|
||||||
|
"all":
|
||||||
|
{
|
||||||
|
"status": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
41
src/sonic-yang-models/yang-models/sonic-bgp-bbr.yang
Normal file
41
src/sonic-yang-models/yang-models/sonic-bgp-bbr.yang
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
module sonic-bgp-bbr {
|
||||||
|
namespace "http://github.com/sonic-net/sonic-bgp-bbr";
|
||||||
|
prefix bgpbbr;
|
||||||
|
yang-version 1.1;
|
||||||
|
|
||||||
|
import sonic-types {
|
||||||
|
prefix stypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
organization
|
||||||
|
"SONiC";
|
||||||
|
|
||||||
|
contact
|
||||||
|
"SONiC";
|
||||||
|
|
||||||
|
description
|
||||||
|
"SONIC BGP BBR";
|
||||||
|
|
||||||
|
revision 2023-12-25 {
|
||||||
|
description
|
||||||
|
"Initial revision.";
|
||||||
|
}
|
||||||
|
|
||||||
|
container sonic-bgp-bbr {
|
||||||
|
container BGP_BBR {
|
||||||
|
|
||||||
|
description "BGP_BBR table part of config_db.json";
|
||||||
|
|
||||||
|
container all {
|
||||||
|
leaf status {
|
||||||
|
type stypes:admin_mode;
|
||||||
|
default enabled;
|
||||||
|
description "bgp bbr status";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* end of container all */
|
||||||
|
}
|
||||||
|
/* end of container BGP_BBR */
|
||||||
|
}
|
||||||
|
/* end of container sonic-bgp-bbr */
|
||||||
|
}
|
Reference in New Issue
Block a user