How to store config data on a leaf


I am reading some config data from csv file and i would like to store this data on cdb as config data. I’ve seen that some maapi API’s but that was for the operational data.

if ((th = maapi_start_trans(msock,CONFD_OPERATIONAL,

Above code was taken from examples/intro/13-c_stats_push. But as i said its for non config data. In short i need to set leaf values in container that specified in YANG. How can I add, edit leafs data?

Thanks in advance.


you can check e.g. example ${CONFD_DIR}/examples.confd/12-c_maapi/maapi_example.c and there, a procedure:

int update_start_log(void)

where you have a simple transaction opened into configuration. you may need to change dbname from candidate to running if your use case differs from the example…

1 Like

thanks for the advice, that’s great…