How to get RO leaf in a RW list while the list is system-created

Hi, we have such model: my_list is list which is created by backend code, should not created by user. Key my_list_id is RW leaf, leaf_a is RW leaf, leaf_b and leaf_c are RO leaf.
list my_list {
key my_list_id;

leaf my_list_id {
    type string;
leaf leaf_a {
    type string;
leaf leaf_b {
    config false;
    type string;
leaf leaf_c {
    config false;
    type uint16;


  1. If I register callpoint on list, then ConfD can call get_next/get_elem to get operational data from our backend. However, ConfD thinks we’re using external database, and causes some candidate commit issue. We hope to use CDB.
  2. Then I try to register callpoint on my_list_id, leaf_b, and leaf_c rather than on list, but ConfD doesn’t call get_next to get the key value from our backend. I guess ConfD only wants to get key value from CDB because my_list_id is RW.
  3. It looks we should write my_list_id values into CDB. How can we write my_list_id values into CDB?
    Thanks a lot.



If you want to store operatinal data into CDB, use tailf:cdb-oper annotation. There is no need to
register data provider callback in such case as data is fetched directly from CDB.
See tailf:cdb-oper annotation description in the user guide and chapter 6.8.

To store operational data into CDB you can use cdb_set... API calls or load them from file (with confd_load command).

Hi mnovak,

Thanks a lot for your reply.

We don’t want to store operational data into CDB. Actually value of my_list_id, leaf_b and leaf_c are all stored in our backend, leaf_a is not supported yet(just ignore it).
Since my_list_id is RW key, and there is no key value in CDB, so ConfD doesn’t call get_next/get_elem to get leaf_b and leaf_c. So my question is how can we write RW my_list_id into CDB? Thanks.