sysrepo
3.0.0
YANG-based system repository for all-around configuration management.
|
Functions | |
int | sr_get_lock (sr_conn_ctx_t *conn, sr_datastore_t datastore, const char *module_name, int *is_locked, uint32_t *id, struct timespec *timestamp) |
Check whether the data of the specified module or the whole datastore are locked. More... | |
int | sr_lock (sr_session_ctx_t *session, const char *module_name, uint32_t timeout_ms) |
Locks the data of the specified module or the whole datastore. More... | |
int | sr_unlock (sr_session_ctx_t *session, const char *module_name) |
Unlocks the data of the specified module or the whole datastore. More... | |
int sr_get_lock | ( | sr_conn_ctx_t * | conn, |
sr_datastore_t | datastore, | ||
const char * | module_name, | ||
int * | is_locked, | ||
uint32_t * | id, | ||
struct timespec * | timestamp | ||
) |
Check whether the data of the specified module or the whole datastore are locked.
Note that if whole datastore is checked, is_locked
will be set only if all the modules are locked by the same Sysrepo session. If a module is not locked or locked by another Sysrepo session, is_locked
will be false.
[in] | conn | Connection to use. |
[in] | datastore | Datastore of the lock. |
[in] | module_name | Optional name of the module to check. |
[out] | is_locked | True is the module or whole datastore is locked. |
[out] | id | Optional Sysrepo SID of the session if the module/datastore is locked. |
[out] | timestamp | Optional timestamp of the lock. |
int sr_lock | ( | sr_session_ctx_t * | session, |
const char * | module_name, | ||
uint32_t | timeout_ms | ||
) |
Locks the data of the specified module or the whole datastore.
Required READ access.
[in] | session | Session (DS-specific) to use. |
[in] | module_name | Optional name of the module to be locked. |
[in] | timeout_ms | Timeout in milliseconds for waiting for the lock(s). If 0, no waiting is performed. |
int sr_unlock | ( | sr_session_ctx_t * | session, |
const char * | module_name | ||
) |