I would like to clear the question.
We are working with external running DB. It is existing DB with other user interfaces (e.g. SNMP, cli) that already implemented.
For each set/create/delete operation we reply with “CONFD_ACCUMULATE”.
when the transaction is committed, we go over the accumulated list and conficure it in the DB.
since the DB exist before implementing the NetConf and yang, sometimes we dont have all the needed DB data (keys) from the yang.
Is there a way to get a leaf’s value from the candidate DB which is in confd?
how can we use the MAAPI in the case I described?
thank you for your answer.
I see in the user guide that in order to read value we should:
get the parameter value (e.g. maapi_get_int64_elem(maapi_socket, tctx->thandle, &b_val, “/mtest/b_number”)
Since we use CONFD_DAEMON_FLAG_STRINGSONLY flag, I wonder how we should read value of a leaf which was defined as integer for example.
should we do maapi_get_int64_elem or other API as maapi_get_str_elem or maapi_get_buf_elem.
CONFD_DAEMON_FLAG_STRINGSONLY applies only to the callbacks for a data provider daemon, i.e. set_elem() etc - there is no corresponding MAAPI function that returns values as strings regardless of the actual type. But if you have loaded schema information, you can use confd_val2str() to produce a string for a confd_value_t that you have read via MAAPI.