-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang-model] Using 'leafref' instead of 'must' for loopback (#9535)
#### Why I did it Fix issue sonic-net/sonic-utilities#1962 The problem is current implementation of [sonic-yang-mgmt::find_data_dependencies](https://github.com/Azure/sonic-buildimage/blob/f2774b635dee2d5c0e30489632b47e0210a712dd/src/sonic-yang-mgmt/sonic_yang.py#L518) does not get referrers if they are using `must` statement, it has to use `leafref`. For now we can convert `must` to `leafref` if possible. In the future we will investigate get referrers by `must` statements as well #9534 #### How I did it Instead of `must` use `leafref` #### How to verify it unit-test #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106
- Loading branch information
Showing
3 changed files
with
8 additions
and
9 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
src/sonic-yang-models/tests/yang_model_tests/tests/loopback.json
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
2 changes: 1 addition & 1 deletion
2
src/sonic-yang-models/tests/yang_model_tests/tests_config/loopback.json
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