-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[YANG] Enable Yang model for BGP_BBR config entry #17622
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bd69177
Add yang model for BGP bbr
Gfrom2016 a32a590
Add ut for bgp_bbr yang
Gfrom2016 7f368c3
Add missing semicolons
Gfrom2016 8129781
add BGP_BBR to sample_config_db.json
Gfrom2016 d436dd6
Update doc
Gfrom2016 a1774d6
change status type to admin_mode
Gfrom2016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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_VALID_STATUS": { | ||
"desc": "status with valid value", | ||
"eStrKey": "Pattern" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/sonic-yang-models/tests/yang_model_tests/tests_config/bgp_bbr.json
This file contains hidden or 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_VALID_STATUS": { | ||
"sonic-bgp-bbr:sonic-bgp-bbr": { | ||
"sonic-bgp-bbr:BGP_BBR": { | ||
"all": | ||
{ | ||
"status": "true" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or 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,37 @@ | ||
module sonic-bgp-bbr { | ||
namespace "http://github.com/sonic-net/sonic-bgp-bbr"; | ||
prefix bgpbbr; | ||
yang-version 1.1; | ||
|
||
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 string { | ||
pattern "enabled|disabled"; | ||
} | ||
} | ||
} | ||
/* end of container all */ | ||
} | ||
/* end of container BGP_BBR */ | ||
} | ||
/* end of container sonic-bgp-bbr */ | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use admin_mode for this :
sonic-buildimage/src/sonic-yang-models/yang-templates/sonic-types.yang.j2
Line 127 in d436dd6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Others lgtm