-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Yang model for SYSTEM_DEFAULTS table
#11117
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
bingwang-ms
merged 10 commits into
sonic-net:master
from
bingwang-ms:add_yang_for_SYSTEM_DEFAULTS
Jul 4, 2022
+110
−3
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ac6991c
Add Yang model for SYSTEM_DEFAULTS table
bingwang-ms 3946938
Add Yang model for SYSTEM_DEFAULTS table
bingwang-ms f28a040
Fix vs test
bingwang-ms a25db3d
Update Configuration.md
bingwang-ms 049362c
Update Configuration.md
bingwang-ms c7ea316
Merge branch 'master' into add_yang_for_SYSTEM_DEFAULTS
bingwang-ms 6aadc7f
Use admin_mode
bingwang-ms bc5fcc3
Merge branch 'add_yang_for_SYSTEM_DEFAULTS' of https://github.com/bin…
bingwang-ms f2424df
Fix vstest
bingwang-ms 3cb9e2f
Fix merge error
bingwang-ms 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/system_defaults.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 @@ | ||
| { | ||
| "SYSTEM_DEFAULTS_WITH_CORRECT_VALUES": { | ||
| "desc": "CONFIG SYSTEM_DEFAULTS TABLE WITH ALL THE CORRECT VALUES" | ||
| }, | ||
| "SYSTEM_DEFAULTS_WITH_INVALID_STATUS_VALUE" : { | ||
| "desc": "Referring invalid status value", | ||
| "eStrKey": "InvalidValue" | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.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,26 @@ | ||
| { | ||
| "SYSTEM_DEFAULTS_WITH_CORRECT_VALUES": { | ||
| "sonic-system-defaults:sonic-system-defaults": { | ||
| "sonic-system-defaults:SYSTEM_DEFAULTS": { | ||
| "SYSTEM_DEFAULTS_LIST": [ | ||
| { | ||
| "name": "tunnel_qos_remap", | ||
| "status": "enabled" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "SYSTEM_DEFAULTS_WITH_INVALID_STATUS_VALUE": { | ||
| "sonic-system-defaults:sonic-system-defaults": { | ||
| "sonic-system-defaults:SYSTEM_DEFAULTS": { | ||
| "SYSTEM_DEFAULTS_LIST": [ | ||
| { | ||
| "name": "tunnel_qos_remap", | ||
| "status": "invalid_status" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
39 changes: 39 additions & 0 deletions
39
src/sonic-yang-models/yang-models/sonic-system-defaults.yang
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,39 @@ | ||
| module sonic-system-defaults{ | ||
|
|
||
| yang-version 1.1; | ||
|
|
||
| namespace "http://github.com/Azure/system-defaults"; | ||
| prefix system-defaults; | ||
|
|
||
| import sonic-types { | ||
| prefix stypes; | ||
| } | ||
|
|
||
| description "SYSTEM_DEFAULTS Table yang Module for SONiC"; | ||
|
|
||
| container sonic-system-defaults { | ||
|
|
||
| container SYSTEM_DEFAULTS { | ||
|
|
||
| description "system_defaults table in config_db.json"; | ||
|
|
||
| list SYSTEM_DEFAULTS_LIST { | ||
|
|
||
| key "name"; | ||
|
|
||
| leaf name { | ||
| description "feature name in SYSTEM_DEFAULTS table"; | ||
| type string { | ||
| length 1..32; | ||
| } | ||
| } | ||
|
|
||
| leaf status { | ||
| description "default status of the feature"; | ||
| type stypes:admin_mode; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.