forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPB][YANG] Fix cases when boolean is used in different literal cases (…
…sonic-net#9418) Fixes sonic-net#9326 #### Why I did it When we try execute DPB from CLI we have error: `libyang[0]: Invalid value "False" in "has_global_scope" element. (path: /sonic-feature:sonic-feature/FEATURE/FEATURE_LIST[name='bgp']/has_global_scope)` The reason for this issue is that has_global_scope and other have been stored in redis database with value False or True form capital letter: ``` "FEATURE":{ "bgp":{ "auto_restart":"enabled", "has_global_scope":"False", "has_per_asic_scope":"True", "has_timer":"False", "high_mem_alert":"disabled", "state":"enabled" } ``` But yang model support boolean just in lowercase letters (https://datatracker.ietf.org/doc/html/rfc6020#section-9.5.1). #### How I did it Added boolean to sonic-types as typedef with different literal cases. #### How to verify it Run the command config interface breakout <breakout_mode> **NOTE:** To verify this fix, the following PRs that fix other problems in SONiC must be merged into master: 1) sonic-net/pull/9075 2) sonic-net/pull/9276
- Loading branch information
1 parent
5384b30
commit afd4098
Showing
6 changed files
with
49 additions
and
14 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
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