Skip to content
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

[yang-models] find_data_dependencies by 'must' statement not only 'leafref' #9534

Open
ghooo opened this issue Dec 14, 2021 · 0 comments
Open
Labels
Triaged this issue has been triaged YANG YANG model related changes

Comments

@ghooo
Copy link
Contributor

ghooo commented Dec 14, 2021

Description

The problem is current implementation of sonic-yang-mgmt::find_data_dependencies does not get referrers if they are using must statement, it has to use leafref.

Investigate getting referrers by must statements as well.

@ghooo ghooo added the YANG YANG model related changes label Dec 14, 2021
ghooo added a commit that referenced this issue Dec 16, 2021
#### 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
judyjoseph pushed a commit that referenced this issue Jan 9, 2022
#### 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
@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged YANG YANG model related changes
Projects
None yet
Development

No branches or pull requests

2 participants