sysrepo 3.6.11
YANG-based system repository for all-around configuration management.
Loading...
Searching...
No Matches
plugins_datastore.h File Reference

API for datastore plugins. More...

#include <stdint.h>
#include <sys/types.h>
#include <libyang/libyang.h>
#include "sysrepo_types.h"
Include dependency graph for plugins_datastore.h:

Go to the source code of this file.

Data Structures

struct  srplg_ds_s
 Datastore plugin structure. More...

Macros

#define SRPLG_DATASTORE
 Macro to define datastore plugin information in external plugins.
#define SRPLG_DS_API_VERSION   13
 Datastore plugin API version.

Typedefs

typedef sr_error_info_t *(* srds_access_check) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data, int *read, int *write)
 Check whether the current user has the required access to datastore data.
typedef sr_error_info_t *(* srds_access_get) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data, char **owner, char **group, mode_t *perm)
 Get access permissions for datastore data of a module. This function is also used for sysrepo access control checks for the module when SR_DS_STARTUP is used.
typedef sr_error_info_t *(* srds_access_set) (const struct lys_module *mod, sr_datastore_t ds, const char *owner, const char *group, mode_t perm, void *plg_data)
 Set access permissions for datastore data of a module.
typedef sr_error_info_t *(* srds_candidate_modified) (const struct lys_module *mod, void *plg_data, int *modified)
 Learn whether the candidate datastore was modified and is different from running.
typedef sr_error_info_t *(* srds_candidate_reset) (const struct lys_module *mod, void *plg_data)
 Reset candidate datastore to "no changes" - mirroring running.
typedef void(* srds_conn_destroy) (sr_conn_ctx_t *conn, void *plg_data)
 Destroy (free) per-connection plugin data.
typedef sr_error_info_t *(* srds_conn_init) (sr_conn_ctx_t *conn, void **plg_data)
 Initialize per-connection plugin data.
typedef sr_error_info_t *(* srds_copy) (const struct lys_module *mod, sr_datastore_t trg_ds, sr_datastore_t src_ds, void *plg_data)
 Copy data of a module from source datastore to the target datastore.
typedef sr_error_info_t *(* srds_data_version) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data, uint32_t *version)
 Get the current datastore data version, optional callback.
typedef sr_error_info_t *(* srds_init) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data)
 Initialize data of a newly installed module.
typedef sr_error_info_t *(* srds_install) (const struct lys_module *mod, sr_datastore_t ds, const char *owner, const char *group, mode_t perm, void *plg_data)
 Setup datastore of a newly installed module.
typedef sr_error_info_t *(* srds_last_modif) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data, struct timespec *mtime)
 Get the time when the datastore data of the module were last modified or 0 if the datastore data are not modified (see ds).
typedef sr_error_info_t *(* srds_load) (const struct lys_module *mod, sr_datastore_t ds, sr_cid_t cid, uint32_t sid, const char **xpaths, uint32_t xpath_count, void *plg_data, struct lyd_node **mod_data)
 Load data of a module.
typedef sr_error_info_t *(* srds_store_commit) (const struct lys_module *mod, sr_datastore_t ds, sr_cid_t cid, uint32_t sid, const struct lyd_node *mod_diff, const struct lyd_node *mod_data, void *plg_data)
 Store data for a module. Either a diff can be applied manually (if available) or full new data tree stored.
typedef sr_error_info_t *(* srds_store_prepare) (const struct lys_module *mod, sr_datastore_t ds, sr_cid_t cid, uint32_t sid, const struct lyd_node *mod_diff, const struct lyd_node *mod_data, void *plg_data)
 Prepare to store data for a module. Either a diff can be applied manually (if available) or full new data tree store prepared.
typedef sr_error_info_t *(* srds_uninstall) (const struct lys_module *mod, sr_datastore_t ds, void *plg_data)
 Destroy data of an uninstalled module.

Detailed Description

API for datastore plugins.

Author
Michal Vasko mvask.nosp@m.o@ce.nosp@m.snet..nosp@m.cz

This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/BSD-3-Clause

Definition in file plugins_datastore.h.