Transformer Infra sonic yang singleton container support#87
Merged
kwangsuk merged 8 commits intosonic-net:masterfrom Jun 12, 2023
Conversation
-Changes in DbSpec creation, inherit db-name from sonic table, use cvl db-name annotation for sonic yang, utility function changes -Support exclusion of sonic yangs xfmr support from models list
…ang table containing a singleton container and UT cases exercising this mapping using table-name and key-name annotations
kwangsuk
approved these changes
May 26, 2023
sachinholla
approved these changes
Jun 9, 2023
sachinholla
approved these changes
Jun 12, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What are the changes
Transformer changes to support sonic singleton container. The changes involve the following
Singleton container refers to YANG container mapped to a singleton table.
e.g.
The above sonic yang structure translates to the following ConfigDB key -
"TEST_SENSOR_GLOBAL|global_sensor"
Why the changes are required
To support singleton container in community sonic yangs.
sflow app will be supported in mgmt-framework soon which uses the sonic-sflow.yang from community containing singleton container.
How did I verify the changes
Verified using the singleton container in transformer sonic test yang.
Attached are the UT results and log.
transformer.out.txt
transformer.log
PS: The changes are dependent on the CVL changes for a successful write to DB which will be in a separate PR.
As mentioned in PR #89 this PR also addresses the below.
This is the first step towards addressing sonic-net/sonic-buildimage#15183 requirement. We cannot support all yangs from sonic-buildimage/src/sonic-yang-models as of now due to limitations in UMF code generators, cvl & transformer components. They will be enhanced gradually later.