-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support Grouping translation in YANG Models. #8318
Conversation
20787ac
to
741a59d
Compare
741a59d
to
faae0c3
Compare
@jleveque : can you help in running the Azure pipeline again, seems like temporary failure. Thanks a lot. |
@qiluo-msft, @renukamanavalan : not sure, who is the right person to review this PR. |
@arlakshm Could you help review? |
Changes: -- pre Process Grouping section from all yang models, so it can be used from any yang model. -- add jsondiff in setup.py, it is useful for test debugging in case of failures. -- use 'stypes' instead of head. -- pass config DB table name in _createLeafDict(). -- added test config for grouping. -- white spaces changes . Note: Changes are done in the way that we can add supoort for other Generic YANG statement easily for tranlation. Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
faae0c3
to
c2dc42f
Compare
Rebased to rerun Azure Pipeline |
PR owner could use |
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.
lgtm
#### What I did Fixes #2041 Supporting groupings during `config-db path` <-> `config-yang xpath` translation This mimics the `config-db` <-> `config-yang` translation as added by sonic-net/sonic-buildimage#8318 #### How I did it Handled groupings of leaf commands only as that's what is supported in sonic-yang-mgmt #### How to verify it unit-test #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
#### What I did Fixes #2041 Supporting groupings during `config-db path` <-> `config-yang xpath` translation This mimics the `config-db` <-> `config-yang` translation as added by sonic-net/sonic-buildimage#8318 #### How I did it Handled groupings of leaf commands only as that's what is supported in sonic-yang-mgmt #### How to verify it unit-test #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
[sonic_yang_ext.py]: Support Grouping translation in YANG Models.
Changes:
-- pre Process Grouping section from all yang models, so it can be used
from any yang model.
-- add jsondiff in setup.py, it is useful for test debugging in case of
failures.
-- use 'stypes' instead of head.
-- pass config DB table name in _createLeafDict().
-- added test config for grouping.
-- white spaces changes.
Note: Changes are done in the way that we can add supoort for other
Generic YANG statement easily for tranlation.
Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
Why I did it
Need to support Grouping translation in YANG Models.
How I did it
Changes:
-- pre Process Grouping section from all yang models, so it can be used
from any yang model. File: src/sonic-yang-mgmt/sonic_yang_ext.py
-- add jsondiff in setup.py, it is useful for test debugging in case of
failures.
-- use 'stypes' instead of head.
-- pass config DB table name in _createLeafDict().
-- added test config for grouping.
-- white spaces changes.
How to verify it
Added Build Time Tests: File: src/sonic-yang-models/tests/files/sample_config_db.json
Build the PKG.
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)