I have a requirement where I need to check the type of the leaf and then set the value in cdb according to the type of leaf using maapi_set_elem2().
This is required because we changed the type of the leaf from integer to string after some releases and now need to have this flexibility in code so that after upgrade or downgrade the correct data should be populated with the correct type in cdb.
Any help, suggestion or guidance would be appreciated.
Specifically struct confd_cs_node, and it’s field struct confd_cs_node_info info;.
There are methods in the confd_lib api that you can use to retrieve information on specified nodes of data model, and check for details that you need…
confd_find_cs_node() to get the node info, and then node->info.shallow_type for leaf type, etc.