[yang] add yang options for Context object#10359
Conversation
|
/azpw run Azure.sonic-buildimage |
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@qiluo-msft could you please help to signoff? |
|
Could you explain more of the section "How to verify it" |
spm in sonic-package-manager |
|
@qiluo-msft could you please review following comments above? |
|
@praveen-li could you please take a look on this PR as well? |
qiluo-msft
left a comment
There was a problem hiding this comment.
LGTM. Please wait for other reviewers.
|
@praveen-li kindly reminder to review this PR |
#### Why I did it Need to pass LY_CTX_DISABLE_SEARCHDIR_CWD to Context in order to disable automatically searching for schemas in current working directory (which is by default searched automatically) #### How I did it add additional attribute into YANG context #### How to verify it Create some invalid link on switch : 1) **ln -s /usr/abc xxx** 2) run **spm list** --> There should not be these messages: ``` libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) ```
#### Why I did it Need to pass LY_CTX_DISABLE_SEARCHDIR_CWD to Context in order to disable automatically searching for schemas in current working directory (which is by default searched automatically) #### How I did it add additional attribute into YANG context #### How to verify it Create some invalid link on switch : 1) **ln -s /usr/abc xxx** 2) run **spm list** --> There should not be these messages: ``` libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) libyang[1]: Unable to get information about "xxx" file in "/tmp" when searching for (sub)modules (No such file or directory) ```
Why I did it
Need to pass LY_CTX_DISABLE_SEARCHDIR_CWD to Context in order to disable automatically searching for schemas in current working directory (which is by default searched automatically)
How I did it
add additional attribute into YANG context
How to verify it
Create some invalid link on switch :
--> There should not be these messages:
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)