17#ifndef SYSREPO_PRIVATE_CANDIDATE_H_
18#define SYSREPO_PRIVATE_CANDIDATE_H_
20#include <libyang/libyang.h>
169 const char *default_operation);
245 const struct lyd_node *src_config);
Structure that safely wraps libyang data and prevents unexpected context changes.
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...
int sr_pc_backup_privcand(sr_session_ctx_t *session, sr_priv_cand_t *privcand, sr_priv_cand_t **privcand_backup)
Make a backup copy of the private candidate datastore structure.
int sr_pc_create_ds(sr_session_ctx_t *session, uint32_t subscription_opts, sr_subscription_ctx_t **subscription, sr_priv_cand_t **private_candidate_ds)
Creates a private candidate datastore structure.
struct lyd_node * pc_diff
int sr_pc_replace_trg_config(sr_session_ctx_t *session, sr_priv_cand_t *privcand, const char *module_name, const struct lyd_node *src_config)
Replaces private candidate datastore with the contents of another conventional datastore.
void sr_pc_restore_privcand(sr_priv_cand_t *privcand_target, sr_priv_cand_t *privcand_backup)
Replaces the content of private candidate structure with the content of another private candidate str...
sr_pc_conflict_type_t type
int sr_pc_commit(sr_session_ctx_t *session, sr_priv_cand_t *private_candidate_ds, sr_pc_conflict_set_t **conflict_set)
Performs <commit> operation on private candidate datastore.
void sr_pc_free_conflicts(sr_pc_conflict_set_t *conflict_set)
Remove and free all conflict data.
void sr_pc_discard_changes(sr_priv_cand_t *private_candidate_ds)
Performs <discard-changes> operation on private candidate datastore.
sr_pc_conflict_type_t
Types of conflicts that may occur during private candidate datastore <update>.
@ SR_PC_CONFLICT_LEAFLIST_ORDER
@ SR_PC_CONFLICT_VALUE_CHANGE
@ SR_PC_CONFLICT_LIST_ENTRY
@ SR_PC_CONFLICT_LEAFLIST_ITEM
@ SR_PC_CONFLICT_LEAF_EXISTENCE
@ SR_PC_CONFLICT_PRESENCE_CONTAINER
@ SR_PC_CONFLICT_LIST_ORDER
struct lyd_node * run_diff
sr_pc_conflict_resolution_t
Strategies for resolving configuration conflicts when merging candidate and running datastores.
@ SR_PC_REVERT_ON_CONFLICT
int sr_pc_get_data(sr_session_ctx_t *session, const char *xpath, uint32_t max_depth, const uint32_t opts, const sr_priv_cand_t *private_candidate_ds, sr_data_t **data)
Retrieve a tree whose root nodes match the provided XPath. Data are represented as libyang subtrees.
sr_pc_conflict_info_t * conflicts
int sr_pc_destroy_ds(sr_session_ctx_t *session, sr_priv_cand_t *privcand)
Destroys the private candidate datastore structure.
int sr_pc_edit_config(sr_session_ctx_t *session, sr_priv_cand_t *private_candidate_ds, const struct lyd_node *edit, const char *default_operation)
Performs <edit-config> operation on private candidate datastore.
int sr_pc_update(sr_session_ctx_t *session, sr_priv_cand_t *private_candidate_ds, sr_pc_conflict_resolution_t conflict_resolution, sr_pc_conflict_set_t **conflict_set)
Performs <update> operation on private candidate datastore.
int sr_pc_validate(sr_session_ctx_t *session, const char *module_name, const sr_priv_cand_t *privcand)
Perform the validation of private candidate datastore.
Structure representing a set of detected conflicts between the running and private candidate datastor...
Stores information about conflicts.
public API sysrepo header
struct sr_session_ctx_s sr_session_ctx_t
Sysrepo session on a connection.
struct sr_priv_cand_s sr_priv_cand_t
Private candidate datastore context.