-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information
1 parent
4b6feaa
commit 8b88d8d
Showing
6 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/sonic-yang-models/tests/yang_model_tests/tests/bgp_bbr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"BGP_BBR_TABLE": { | ||
"desc": "BGP BBR Table" | ||
}, | ||
"BGP_BBR_INVALID_STATUS": { | ||
"desc": "Configure status key with invalid value", | ||
"eStrKey": "InvalidValue" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_bbr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ | ||
} |