-
Notifications
You must be signed in to change notification settings - Fork 299
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
LYD_OPT_NOEXTDEPS
no longer exists, alternatives?
#2355
Comments
The flag |
PARSE flags aren't even in scope for the SONiC codepaths here as That said, I'm sort of stuck in something that would probably be a multi-month effort to rework this code to be more sane, but I'm really just trying to port it from libyang1 to libyang3 which I thought would just be a day or two. I'm already a week in. This is actually the last project in SONiC using libyang, everything else was fairly easy to port once you got those other changes merged in we needed... In case you're curious, this is the project being ported ... its written in Go, which adds to the complexity calling out to a C library ... sonic-net/sonic-mgmt-common#157 |
I have realized the functionality may have been implemented for a completely different purpose, try using
Based on your description and all the previous issues, not really :) |
Tried that a while ago, the issue is it doesn't validate min/max. There may be other things it doesn't validate that were previously expected to be validated, that was just the first set of issues I hit.
Good choice :) |
Actually, it did not work correctly then. Because if there was a list node with |
It really does sound like the whole partial / incremental validation concept is just flawed. I think I'm just going to have to see what the performance hit really is by serializing the entire config, merging in said incremental changes, then running the full validation. |
The transition manual from v1 to v2 says:
In sonic-mgmt-common, it is using
LYD_OPT_NOEXTDEPS
for partial tree validations. This validation still wants to check for things like valid data for constraints/patterns/length, min/max, mandatory, and so forth ... but does not want to check outside of the current module for leafrefs/must/when. The code does not have the full data tree available at this point when calling lyd_validate_all(), hence the use of this flag.Is there an alternative approach that can be used? Or would you accept patches to reimplement a flag like
LYD_VALIDATE_NOEXTDEPS
to restore the prior behavior?The text was updated successfully, but these errors were encountered: