 |
sysrepo
1.4.70
YANG datastore
|
Go to the documentation of this file.
31 #include <libyang/Tree_Data.hpp>
71 void set_error(
const char *message,
const char *path);
90 libyang::S_Data_Node
get_subtree(
const char *path, uint32_t timeout_ms = 0);
92 libyang::S_Data_Node
get_data(
const char *xpath, uint32_t max_depth = 0, uint32_t timeout_ms = 0, \
98 void set_item_str(
const char *path,
const char *value,
const char *origin =
nullptr, \
104 const char *leaflist_value =
nullptr,
const char *origin =
nullptr,
const sr_edit_options_t opts = EDIT_DEFAULT);
106 void edit_batch(
const libyang::S_Data_Node edit,
const char *default_operation);
108 void validate(
const char *module_name =
nullptr, uint32_t timeout_ms = 0);
114 void replace_config(
const libyang::S_Data_Node src_config,
const char *module_name =
nullptr, uint32_t timeout_ms = 0, \
120 void lock(
const char *module_name =
nullptr);
122 void unlock(
const char *module_name =
nullptr);
137 libyang::S_Data_Node
rpc_send(libyang::S_Data_Node input, uint32_t timeout_ms = 0);
198 void *private_data =
nullptr, uint32_t priority = 0,
sr_subscr_options_t opts = SUBSCR_DEFAULT);
207 time_t start_time = 0, time_t stop_time = 0,
void *private_data =
nullptr,
sr_subscr_options_t opts = SUBSCR_DEFAULT);
210 time_t start_time = 0, time_t stop_time = 0,
void *private_data =
nullptr,
sr_subscr_options_t opts = SUBSCR_DEFAULT);
std::shared_ptr< Deleter > S_Deleter
public API sysrepo header
Sysrepo class header for internal C++ classes.
std::shared_ptr< Tree_Change > S_Tree_Change
void event_notif_send(const char *path, S_Vals values)
Helper class for calling C callbacks, C++ only.
void copy_config(sr_datastore_t src_datastore, const char *module_name=nullptr, uint32_t timeout_ms=0, int wait=0)
void oper_get_items_subscribe(const char *module_name, const char *path, S_Callback callback, void *private_data=nullptr, sr_subscr_options_t opts=SUBSCR_DEFAULT)
std::vector< S_Callback > cb_list
void lock(const char *module_name=nullptr)
void set_item_str(const char *path, const char *value, const char *origin=nullptr, const sr_edit_options_t opts=EDIT_DEFAULT)
libyang::S_Data_Node get_subtree(const char *path, uint32_t timeout_ms=0)
S_Change get_change_next(S_Iter_Change iter)
time_t process_events(S_Session sess=nullptr)
Subscribe(S_Session sess)
enum sr_datastore_e sr_datastore_t
Datastores that sysrepo supports. To change which datastore a session operates on,...
Class for wrapping sr_session_ctx_t.
void additional_cleanup(void *private_data)
std::shared_ptr< Vals_Holder > S_Vals_Holder
sr_datastore_t session_get_ds()
uint32_t sr_subscr_options_t
Options overriding default behavior of subscriptions, it is supposed to be a bitwise OR-ed value of a...
std::shared_ptr< Errors > S_Errors
std::shared_ptr< Iter_Change > S_Iter_Change
libyang::S_Context get_context()
void set_nc_id(uint32_t nc_id)
void delete_item(const char *path, const sr_edit_options_t opts=EDIT_DEFAULT)
std::shared_ptr< Session > S_Session
std::shared_ptr< Change > S_Change
Sysrepo Sysrepo class header.
enum sr_move_position_e sr_move_position_t
Options for specifying move direction of sr_move_item call.
virtual void event_notif_tree(S_Session session, const sr_ev_notif_type_t notif_type, const libyang::S_Data_Node notif, time_t timestamp, void *private_data)
std::shared_ptr< Val > S_Val
void event_notif_subscribe(const char *module_name, S_Callback callback, const char *xpath=nullptr, time_t start_time=0, time_t stop_time=0, void *private_data=nullptr, sr_subscr_options_t opts=SUBSCR_DEFAULT)
void move_item(const char *path, const sr_move_position_t position, const char *list_keys=nullptr, const char *leaflist_value=nullptr, const char *origin=nullptr, const sr_edit_options_t opts=EDIT_DEFAULT)
S_Iter_Change get_changes_iter(const char *xpath)
struct sr_subscription_ctx_s sr_subscription_ctx_t
Sysrepo subscription context returned from sr_*_subscribe calls, it is supposed to be released by the...
void rpc_subscribe_tree(const char *xpath, S_Callback callback, void *private_data=nullptr, uint32_t priority=0, sr_subscr_options_t opts=SUBSCR_DEFAULT)
S_Val get_item(const char *path, uint32_t timeout_ms=0)
S_Vals get_items(const char *xpath, uint32_t timeout_ms=0, const sr_get_oper_options_t opts=OPER_DEFAULT)
std::shared_ptr< Callback > S_Callback
void replace_config(const libyang::S_Data_Node src_config, const char *module_name=nullptr, uint32_t timeout_ms=0, int wait=0)
S_Vals rpc_send(const char *path, S_Vals input, uint32_t timeout_ms=0)
sr_subscription_ctx_t ** swig_sub()
std::vector< void * > wrap_cb_l
struct sr_session_ctx_s sr_session_ctx_t
Sysrepo session on a connection.
void session_switch_ds(sr_datastore_t ds)
virtual int module_change(S_Session session, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data)
std::map< const char *, void * > private_data
Session(S_Connection conn, sr_datastore_t datastore=(sr_datastore_t) DS_RUNNING)
enum sr_ev_notif_type_e sr_ev_notif_type_t
Type of the notification passed to the sr_event_notif_cb and sr_event_notif_tree_cb callbacks.
virtual int rpc(S_Session session, const char *op_path, const S_Vals input, sr_event_t event, uint32_t request_id, S_Vals_Holder output, void *private_data)
void edit_batch(const libyang::S_Data_Node edit, const char *default_operation)
Sysrepo Connection class header.
libyang::S_Data_Node get_data(const char *xpath, uint32_t max_depth=0, uint32_t timeout_ms=0, const sr_get_oper_options_t opts=OPER_DEFAULT)
sr_session_ctx_t * swig_sess()
std::shared_ptr< Vals > S_Vals
virtual void event_notif(S_Session session, const sr_ev_notif_type_t notif_type, const char *path, const S_Vals vals, time_t timestamp, void *private_data)
void event_notif_subscribe_tree(const char *module_name, S_Callback callback, const char *xpath=nullptr, time_t start_time=0, time_t stop_time=0, void *private_data=nullptr, sr_subscr_options_t opts=SUBSCR_DEFAULT)
uint32_t sr_get_oper_options_t
Options overriding default get handling by sr_get_data call, it is supposed to be bitwise OR-ed value...
void unlock(const char *module_name=nullptr)
Sysrepo Session class header.
void session_notif_buffer()
S_Iter_Change dup_changes_iter(const char *xpath)
libyang::S_Data_Node rpc_send(libyang::S_Data_Node input, uint32_t timeout_ms=0)
void rpc_subscribe(const char *xpath, S_Callback callback, void *private_data=nullptr, uint32_t priority=0, sr_subscr_options_t opts=SUBSCR_DEFAULT)
std::shared_ptr< Connection > S_Connection
S_Tree_Change get_change_tree_next(S_Iter_Change iter)
void event_notif_send(libyang::S_Data_Node notif)
uint32_t sr_edit_options_t
Options overriding default behavior of data manipulation calls, it is supposed to be bitwise OR-ed va...
void set_user(const char *user)
enum sr_event_e sr_event_t
Type of the event that has occurred (passed to application callbacks).
void module_change_subscribe(const char *module_name, S_Callback callback, const char *xpath=nullptr, void *private_data=nullptr, uint32_t priority=0, sr_subscr_options_t opts=SUBSCR_DEFAULT)
Sysrepo class header for C struts.
virtual int oper_get_items(S_Session session, const char *module_name, const char *path, const char *request_xpath, uint32_t request_id, libyang::S_Data_Node &parent, void *private_data)
void set_error(const char *message, const char *path)
void set_item(const char *path, S_Val value=nullptr, const sr_edit_options_t opts=EDIT_DEFAULT)
virtual int rpc_tree(S_Session session, const char *op_path, const libyang::S_Data_Node input, sr_event_t event, uint32_t request_id, libyang::S_Data_Node output, void *private_data)
void validate(const char *module_name=nullptr, uint32_t timeout_ms=0)
Session(sr_session_ctx_t *sess, S_Deleter deleter=nullptr)
void apply_changes(uint32_t timeout_ms=0, int wait=0)
Class for wrapping sr_subscription_ctx_t.