Skip to content

Commit 7ccef97

Browse files
authored
[YANG] Enable Yang model for BGP_BBR config entry (#17622) (#17692)
1 parent 8defdfe commit 7ccef97

File tree

6 files changed

+93
-0
lines changed

6 files changed

+93
-0
lines changed

src/sonic-yang-models/doc/Configuration.md

+15
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ Table of Contents
77
* [Introduction](#introduction)
88
* [Configuration](#configuration)
99
* [<strong>Config Load and Save</strong>](#config-load-and-save)
10+
1011
* [Incremental Configuration](#incremental-configuration)
1112
* [<strong>Redis and Json Schema</strong>](#redis-and-json-schema)
13+
1214
* [ACL and Mirroring](#acl-and-mirroring)
15+
* [BGP BBR](#bgp-bbr)
1316
* [BGP Device Global](#bgp-device-global)
1417
* [BGP Sessions](#bgp-sessions)
1518
* [BUFFER_PG](#buffer_pg)
@@ -365,6 +368,18 @@ and migration plan
365368
}
366369
}
367370
```
371+
### BGP BBR
372+
373+
The **BGP_BBR** table contains device-level BBR state.
374+
```
375+
{
376+
"BGP_BBR": {
377+
"all": {
378+
"status": "enabled"/"disabled"
379+
}
380+
}
381+
}
382+
```
368383
### BGP Device Global
369384

370385
The **BGP_DEVICE_GLOBAL** table contains device-level BGP global state.

src/sonic-yang-models/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def run(self):
7979
data_files=[
8080
('yang-models', ['./yang-models/sonic-acl.yang',
8181
'./yang-models/sonic-auto_techsupport.yang',
82+
'./yang-models/sonic-bgp-bbr.yang',
8283
'./yang-models/sonic-bgp-common.yang',
8384
'./yang-models/sonic-bgp-device-global.yang',
8485
'./yang-models/sonic-bgp-global.yang',

src/sonic-yang-models/tests/files/sample_config_db.json

+5
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,11 @@
15731573
"local_ip": "12.12.0.2"
15741574
}
15751575
},
1576+
"BGP_BBR": {
1577+
"all": {
1578+
"status": "enabled"
1579+
}
1580+
},
15761581
"BGP_GLOBALS": {
15771582
"default": {
15781583
"router_id": "5.5.5.5",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"BGP_BBR_TABLE": {
3+
"desc": "BGP BBR Table"
4+
},
5+
"BGP_BBR_INVALID_STATUS": {
6+
"desc": "Configure status key with invalid value",
7+
"eStrKey": "InvalidValue"
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"BGP_BBR_TABLE": {
3+
"sonic-bgp-bbr:sonic-bgp-bbr": {
4+
"sonic-bgp-bbr:BGP_BBR": {
5+
"all":
6+
{
7+
"status": "enabled"
8+
}
9+
}
10+
}
11+
},
12+
"BGP_BBR_INVALID_STATUS": {
13+
"sonic-bgp-bbr:sonic-bgp-bbr": {
14+
"sonic-bgp-bbr:BGP_BBR": {
15+
"all":
16+
{
17+
"status": "true"
18+
}
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
module sonic-bgp-bbr {
2+
namespace "http://github.com/sonic-net/sonic-bgp-bbr";
3+
prefix bgpbbr;
4+
yang-version 1.1;
5+
6+
import sonic-types {
7+
prefix stypes;
8+
}
9+
10+
organization
11+
"SONiC";
12+
13+
contact
14+
"SONiC";
15+
16+
description
17+
"SONIC BGP BBR";
18+
19+
revision 2023-12-25 {
20+
description
21+
"Initial revision.";
22+
}
23+
24+
container sonic-bgp-bbr {
25+
container BGP_BBR {
26+
27+
description "BGP_BBR table part of config_db.json";
28+
29+
container all {
30+
leaf status {
31+
type stypes:admin_mode;
32+
default enabled;
33+
description "bgp bbr status";
34+
}
35+
}
36+
/* end of container all */
37+
}
38+
/* end of container BGP_BBR */
39+
}
40+
/* end of container sonic-bgp-bbr */
41+
}

0 commit comments

Comments
 (0)