-
Notifications
You must be signed in to change notification settings - Fork 73
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
default values don't show up in datastores #111
Comments
I can cofirm that the default value is not set in the case when appearing in a top-level leaf, or transitively from the top-level, and in that respect clixon does not comply to the RFC.
The way clixon does this is by populating not explicitly set default values when loading the datastore to the server in memory - the datastore itself does not contain default values. On GET and GET-CONFIG, the default values therefore are reported, but not in the datastore itself. One reason for this is to reduce the datastore size, another is to cope with the situation that the default value is changed: If it is changed, the server would have no way to know if the value in the datastore was explicitly set, or whether it is the previous default value as set by the server. |
* Enforcing RFC 7950 Sec 7.6.1 means unassigned top-level leafs (or leafs under non-presence containers) are assigned default values. * NACM default behaviour is read-only (empty configs are dead-lockedd) * This applies if NACM is loaded and `CLICON_NACM_MODE` is `internal` * Fixed: [default values don't show up in datastores #111](#111)
When fixing this, some YANG default values kicked in which were not set before. This may affect YANG models in general that have top-level defaults, so please note this change.
|
I added some default values to my yang module. I then brought up the server with the new module, and sent a GET_CONFIG command (by using the cli chow command). I was expecting to see the default values in the datastores, but they were all empty.
My Yang module is the following:
module t { leaf r { type uint32; default 22; } }
According to the RFC 7950 (page 74), the default value of this leaf needs to be at least in the candidate datastore after sending a GET_CONFIG command to the server.
Quote:
The default value of a leaf is the value that the server uses if the leaf does not exist in the data tree.
The text was updated successfully, but these errors were encountered: