-
Notifications
You must be signed in to change notification settings - Fork 46
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
Feature/builtin plugins only #107
Conversation
d7b86a2
to
1de8c85
Compare
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.
Hi,
libyang-python only supports the master branch of C libyang (currently 2.x).
The lydevel check is only meant for informative purposes.
Lines 18 to 20 in f09ed11
[testenv:lydevel] | |
setenv = | |
LIBYANG_BRANCH=devel |
If it fails (currently it should fail because libyang 3.x is under development) it is not a problem.
Could you remove all references to libyang 3 which was not released yet and only focus on the enhancements that you require?
Thank you.
Unfortunately again, this feature requires to use |
4b10649
to
e579191
Compare
It tried the first commit and it does not seem to work (the unit test gives me a validation error). If you still want this integrated, could you rebase and recheck? Also, why do we need the last commit for, as it not seem related to the two others? |
This patch introduces store_only flag, which allows user to only store value without performing any sort of additional type checks as length, range, pattern, etc. Signed-off-by: Stefan Gula <[email protected]>
e579191
to
1c6919b
Compare
This patch adds builtin_plugins_only option, which allows user to use only basic YANG type plugins, instead of using advanced plugins as ipv4-address etc. Signed-off-by: Stefan Gula <[email protected]>
This patch fixes broken APIs, which were using no longer valid structs and performing validation step instead of just checking the realtype of data Signed-off-by: Stefan Gula <[email protected]>
Rebased as requested |
Also, why do we need the last commit, as it does not seem related to the two others? |
It is indirectly related. The thing is that once you want to use feature like using of built in plugins only and store only, then you are able to create dnode which passes only very basic checks (like that value is a string type) but skipping the advanced checks (like matching regexps etc.). This works nicely but then when you want to print the data, it will fail as the current printing procedure is also performing value validation against full set of checks, which is totally unexpected behavior from end-user perspective. |
This patch fixes broken APIs, which were using no longer valid structs and performing validation step instead of just checking the realtype of data. Closes: #107 Signed-off-by: Stefan Gula <[email protected]> Signed-off-by: Samuel Gauthier <[email protected]>
I found the time to fix the last commit, which could sometimes stay forever in the while loop. |
Are you sure this works even for "union of union of union..." and also for "leafref pointing to another leafref, pointing to another leafref.."? Also I cannot really imagine a valid YANG schema, which will trigger infinite loop. Only "looped" YANG schema can do that, which shall not even pass through schema validation in general. If it does, then there is a bug in libyang schema validation code and shall be fixed rather there, not in this function.... Can you give me an example of such schema? |
With the code from your commit, our internal tests were looping. |
No description provided.