![]() |
sysrepo
1.4.70
YANG datastore
|
Class for wrapping sr_session_ctx_t. More...
#include <Session.hpp>
Public Member Functions | |
Session (S_Connection conn, sr_datastore_t datastore=(sr_datastore_t) DS_RUNNING) | |
Session (sr_session_ctx_t *sess, S_Deleter deleter=nullptr) | |
void | session_stop () |
void | session_switch_ds (sr_datastore_t ds) |
sr_datastore_t | session_get_ds () |
void | session_notif_buffer () |
S_Errors | get_error () |
void | set_error (const char *message, const char *path) |
uint32_t | get_id () |
void | set_nc_id (uint32_t nc_id) |
uint32_t | get_nc_id () |
void | set_user (const char *user) |
const char * | get_user () |
libyang::S_Context | get_context () |
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) |
libyang::S_Data_Node | get_subtree (const char *path, uint32_t timeout_ms=0) |
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) |
void | set_item (const char *path, S_Val value=nullptr, const sr_edit_options_t opts=EDIT_DEFAULT) |
void | set_item_str (const char *path, const char *value, const char *origin=nullptr, const sr_edit_options_t opts=EDIT_DEFAULT) |
void | delete_item (const char *path, const sr_edit_options_t opts=EDIT_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) |
void | edit_batch (const libyang::S_Data_Node edit, const char *default_operation) |
void | validate (const char *module_name=nullptr, uint32_t timeout_ms=0) |
void | apply_changes (uint32_t timeout_ms=0, int wait=0) |
void | discard_changes () |
void | replace_config (const libyang::S_Data_Node src_config, const char *module_name=nullptr, uint32_t timeout_ms=0, int wait=0) |
void | copy_config (sr_datastore_t src_datastore, const char *module_name=nullptr, uint32_t timeout_ms=0, int wait=0) |
void | lock (const char *module_name=nullptr) |
void | unlock (const char *module_name=nullptr) |
S_Iter_Change | get_changes_iter (const char *xpath) |
S_Iter_Change | dup_changes_iter (const char *xpath) |
S_Change | get_change_next (S_Iter_Change iter) |
S_Tree_Change | get_change_tree_next (S_Iter_Change iter) |
~Session () | |
S_Vals | rpc_send (const char *path, S_Vals input, uint32_t timeout_ms=0) |
libyang::S_Data_Node | rpc_send (libyang::S_Data_Node input, uint32_t timeout_ms=0) |
void | event_notif_send (const char *path, S_Vals values) |
void | event_notif_send (libyang::S_Data_Node notif) |
Friends | |
class | Subscribe |
Class for wrapping sr_session_ctx_t.
Definition at line 52 of file Session.hpp.
Session | ( | S_Connection | conn, |
sr_datastore_t | datastore = (sr_datastore_t) DS_RUNNING |
||
) |
Wrapper for sr_session_start
Session | ( | sr_session_ctx_t * | sess, |
S_Deleter | deleter = nullptr |
||
) |
Wrapper for sr_session_ctx_t, for internal use only.
~Session | ( | ) |
void session_stop | ( | ) |
Wrapper for sr_session_stop
void session_switch_ds | ( | sr_datastore_t | ds | ) |
Wrapper for sr_session_switch_ds
sr_datastore_t session_get_ds | ( | ) |
Wrapper for sr_session_get_ds
void session_notif_buffer | ( | ) |
Wrapper for sr_session_notif_buffer
S_Errors get_error | ( | ) |
Wrapper for sr_get_error
void set_error | ( | const char * | message, |
const char * | path | ||
) |
Wrapper for sr_set_error
uint32_t get_id | ( | ) |
Wrapper for sr_session_get_id
void set_nc_id | ( | uint32_t | nc_id | ) |
Wrapper for sr_session_set_nc_id
uint32_t get_nc_id | ( | ) |
Wrapper for sr_session_get_nc_id
void set_user | ( | const char * | user | ) |
Wrapper for sr_session_set_user
const char* get_user | ( | ) |
Wrapper for sr_session_get_user
libyang::S_Context get_context | ( | ) |
Get libyang context directly from a session.
S_Val get_item | ( | const char * | path, |
uint32_t | timeout_ms = 0 |
||
) |
Wrapper for sr_get_item
S_Vals get_items | ( | const char * | xpath, |
uint32_t | timeout_ms = 0 , |
||
const sr_get_oper_options_t | opts = OPER_DEFAULT |
||
) |
Wrapper for sr_get_items
libyang::S_Data_Node get_subtree | ( | const char * | path, |
uint32_t | timeout_ms = 0 |
||
) |
Wrapper for sr_get_subtree
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 |
||
) |
Wrapper for sr_get_data
void set_item | ( | const char * | path, |
S_Val | value = nullptr , |
||
const sr_edit_options_t | opts = EDIT_DEFAULT |
||
) |
Wrapper for sr_set_item
void set_item_str | ( | const char * | path, |
const char * | value, | ||
const char * | origin = nullptr , |
||
const sr_edit_options_t | opts = EDIT_DEFAULT |
||
) |
Wrapper for sr_set_item_str
void delete_item | ( | const char * | path, |
const sr_edit_options_t | opts = EDIT_DEFAULT |
||
) |
Wrapper for sr_delete_item
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 |
||
) |
Wrapper for sr_move_item
void edit_batch | ( | const libyang::S_Data_Node | edit, |
const char * | default_operation | ||
) |
Wrapper for sr_edit_batch
void validate | ( | const char * | module_name = nullptr , |
uint32_t | timeout_ms = 0 |
||
) |
Wrapper for sr_validate
void apply_changes | ( | uint32_t | timeout_ms = 0 , |
int | wait = 0 |
||
) |
Wrapper for sr_apply_changes
void discard_changes | ( | ) |
Wrapper for sr_discard_changes
void replace_config | ( | const libyang::S_Data_Node | src_config, |
const char * | module_name = nullptr , |
||
uint32_t | timeout_ms = 0 , |
||
int | wait = 0 |
||
) |
Wrapper for sr_replace_config
void copy_config | ( | sr_datastore_t | src_datastore, |
const char * | module_name = nullptr , |
||
uint32_t | timeout_ms = 0 , |
||
int | wait = 0 |
||
) |
Wrapper for sr_copy_config
void lock | ( | const char * | module_name = nullptr | ) |
Wrapper for sr_lock
void unlock | ( | const char * | module_name = nullptr | ) |
Wrapper for sr_unlock
S_Iter_Change get_changes_iter | ( | const char * | xpath | ) |
Wrapper for sr_get_changes_iter
S_Iter_Change dup_changes_iter | ( | const char * | xpath | ) |
Wrapper for sr_dup_changes_iter
S_Change get_change_next | ( | S_Iter_Change | iter | ) |
Wrapper for sr_get_change_next
S_Tree_Change get_change_tree_next | ( | S_Iter_Change | iter | ) |
Wrapper for sr_get_change_tree_next
Wrapper for sr_rpc_send
libyang::S_Data_Node rpc_send | ( | libyang::S_Data_Node | input, |
uint32_t | timeout_ms = 0 |
||
) |
Wrapper for sr_rpc_send_tree
void event_notif_send | ( | const char * | path, |
S_Vals | values | ||
) |
Wrapper for sr_event_notif_send
void event_notif_send | ( | libyang::S_Data_Node | notif | ) |
Wrapper for sr_event_notif_send_tree
|
friend |
Definition at line 144 of file Session.hpp.