-
Notifications
You must be signed in to change notification settings - Fork 718
YANG: remove uses clause handling, now part of sonic-yang-mgmt #3814
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
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
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.
Just leaving a comment here that I accidentally hit approve button. Hopefully this will be enough for "unapproving" this. Although it doesn't matter since I am not an official reviewer anyway.
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
@adyeung , please help tag the YANG and UMF group. |
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352) fix formatting for lines touched (but not caused by me)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
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.
Pull Request Overview
This PR removes the legacy handling of the YANG 'uses' clause from sonic-utilities in favor of integration with sonic-yang-mgmt. Key changes include:
- Eliminating the "group" attribute and related grouping logic from test dictionaries.
- Removing the on_uses function and associated parameters from the YANG parser.
- Adjusting function signatures and docstrings to reflect the removal of grouping support.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/cli_autogen_input/yang_parser_test/assert_dictionaries.py | Removed "group" key from expected test output and updated key names |
sonic_cli_gen/yang_parser.py | Removed usage of grouping in YANG parsing logic and updated function signatures/docstrings accordingly |
Comments suppressed due to low confidence (3)
sonic_cli_gen/yang_parser.py:334
- The docstring and inline comments for on_leaf should be updated to remove references to 'grouping_name' since it is no longer used.
'is-mandatory': get_mandatory(leaf)}
tests/cli_autogen_input/yang_parser_test/assert_dictionaries.py:390
- [nitpick] Verify that the renaming of keys (such as 'GR_1_LEAF_2' and related changes) in the expected dictionaries aligns with the output produced by sonic-yang-mgmt.
"name": "GR_1_LEAF_2",
sonic_cli_gen/yang_parser.py:39
- Ensure that the removal of the 'group' field from the object entity construction in on_object_entity does not break downstream consumers that might expect this field.
'is-mandatory': False
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
When a uses clause imports a grouping, it was only processing leaf entries and ignoring leaf-list and choice clauses. That means that for instance in bgp route maps, route_map_in and route_map_out validations would fail. Honoring the uses refine clause is now also honored which is depended upon in sonic-utilities. This now precompiles the uses clause and integrates it as if the uses clause was not part of the schema as multiple end users were having to do this additional processing. This fixes that behavior and adds test cases to ensure it doesn't regress in the future. This is the proper fix, replacing #21078 that just worked around it. Removal of uses logic in sonic-utilities here: sonic-net/sonic-utilities#3814 Fixes #22382 Work item tracking Microsoft ADO (number only): How I did it Added leaf-list lookup. How to verify it See test cases pass Description for the changelog sonic-yang-mgmt: uses clause with leaf-list, choice not honored
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
4d3fc5a
to
bcea496
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@qiluo-msft Now that sonic-net/sonic-buildimage#21907 is merged this ticket needs to be merged. I just rebased against current master to force a rebuild. |
I forced the rebuild too early, the new sonic-buildimage assets aren't available yet so tests fail. Will retry in a few hours. |
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352) fix formatting for lines touched (but not caused by me)
sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
bcea496
to
b1ef321
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@qiluo-msft all test pass now since the artifacts from the merged PR sonic-net/sonic-buildimage#21907 are available. Can this be merged? |
FYI, all PRs are failing tests in sonic-utilities due to this not being merged! |
…nic-net#3814) sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities. Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses. Signed-off-by: Brad House (@bradh352)
By words "Just leaving a comment here that I accidentally hit approve button. Hopefully this will be enough for "unapproving" this. Although it doesn't matter since I am not an official reviewer anyway."
Just dismissing "request changes" status.
The depenent PR sonic-net/sonic-buildimage#21907 is marked as 202505 not needed, removing 202505 request label |
What I did
sonic-yang-mgmt now integrates uses clauses as if a uses clause didn't exist. No need to have this complex handling in sonic-utilities.
Depends on sonic-net/sonic-buildimage#21907
Fixes sonic-net/sonic-buildimage#22382
How I did it
Besides removal of the code, the only test case changes are the removal of the 'grouping' clause as it is specific to 'uses' which is not relevant and some minor reordering of expected responses.
How to verify it
Run
tests/cli_autogen_yang_parser_test.py
after applying both this PR and sonic-net/sonic-buildimage#21907Previous command output (if the output of a command-line utility has changed)
N/A
New command output (if the output of a command-line utility has changed)
N/A
Signed-off-by: Brad House (@bradh352)