I have a requirement where in I have multiple leaf under a container with default values given. When i do a ‘get’ on the container i want the default values to be displayed of the leaf.
I tried report-all but this does a ‘set’ on all the leaf with default value.
Since i am using a external database i do not want it to set all the leaf. But instead only when i do a get i want it to display the default values in the xml format.
I have tried /confdConfig/defaultHandlingMode
It considers either report-all or trim or explicit as the valid values. But in all cases a ‘set’ is also done.
I want set to be done only for the specific leaf mentioned. The other attributes/leaf with default values must be seen only in case of ‘get’.
I use NETCONF interface to do a GET most of the time. But I can use CLI too.
You may also try confd_set_daemon_flags and set CONFD_DAEMON_FLAG_NO_DEFAULTS, so the set_elem is not issued for default values (see confd_lib_dp in User Guide or man pages).
looking into confd_lib.h, the structure confd_cs_node_info has a field confd_value_t *defval;.
So if you use some of the CS node procedures to get information about YANG model schema (see man page for confd_lib_lib), like confd_find_cs_node(), i assume check for node->defval != NULL will work (resp. if it’s not null, maybe extra check for node->defval.ctype != C_NOEXISTS, but i’m not sure if it’s needed, you can test it during implementation).