You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello team,
I've noticed that validate of the string length doesn't work for the entry "" in case leaf has default value.
let's say we have simple yang
container c1 {
leaf l1 {
type string {
length "1..127";
}
default "somestring";
}
}
> set c1 l1 ""
> show configuration
<c1 xmlns="urn:com:example:yang:test">
<l1/>
</c1>
> show configuration default report-all
<c1 xmlns="urn:com:example:yang:test">
<l1/>
</c1>
Null string overrides the default value but validate/commit doesn't respond with error caused by string length.
Is it expected behavior or not?
As in this case xml_body returns null. So we can't rely on yang and need to double-check element value just not to face with segfault or smth like that under certain circumstances.
The text was updated successfully, but these errors were encountered:
Hello team,
I've noticed that validate of the string length doesn't work for the entry "" in case leaf has default value.
let's say we have simple yang
Null string overrides the default value but validate/commit doesn't respond with error caused by string length.
Is it expected behavior or not?
As in this case xml_body returns null. So we can't rely on yang and need to double-check element value just not to face with segfault or smth like that under certain circumstances.
The text was updated successfully, but these errors were encountered: