[sysrepo-devel] sysrepo API change

Michal Vaško mvasko at cesnet.cz
Wed Aug 29 08:42:04 UTC 2018


Hi everyone,
we would like to receive feedback on an API change we are planning. There is a good chance the majority of sysrepo clients will not be affected at all but that is exactly what we are trying to find out.

Currently, there are 2 API variants for many functions. These functions are either without a suffix or end with "_subtree". Namely, sr_action_send(), sr_action_subscribe(), sr_event_notif_send(), sr_event_notif_subscribe(), sr_rpc_send(), sr_rpc_subscribe(). Additionally, there are pairs sr_get_item*() and sr_get_subtree*(). Functionality of these functions is the same except they return any nodes either in sr_val_t structures or sr_node_t structures. We would like to remove sr_node_t structures altogether and replace them with a libyang native data tree format struct lyd_node *. This format will also be much more efficient to work with than both sr_node_t and sr_val_t.

TLDR; Do you have any clients using the subtree API variant of sysrepo functions (that work with sr_node_t)? If so, are you strongly against changing those structures to the libyang struct lyd_node *? All the information in sr_node_t can be also read from lyd_node but it would require some refactoring of your code.

Thank you for any feedback.

Regards,
Michal


More information about the sysrepo-devel mailing list