sysrepo  1.4.58
YANG datastore
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Schemas

Before it is possible to work with any data, YANG schemas (modules) need to be installed into Sysrepo. However, such a YANG module change is not performed immediately. These changes, which also include removing, updating a module or changing its features, are only scheduled to be performed and are applied during new Sysrepo connection creation if there are no other connections. The reason for this mechanism is that the module context cannot change while there are some data connected to it (libyang requirement) and they often are even when no Sysrepo function is being executed. That is the price for having a context created with all the schemas at all times so there are no temporary ones needed.

Sysrepo allows to update installed modules keeping their current data, as mentioned before. The new schema should follow standardized updating rules but Sysrepo only requires for the schema revision to be newer than the previous schema and that the stored module data are valid for the new schema. This is checked before the actual update.

Then, every module replay support and permissions (more in access control) can be changed. This must always be performed separately because these attributes cannot be set during installation and defaults are used.

Lastly, module information data can be retrieved from Sysrepo. These include some additional information about each module that is specific to Sysrepo. However, most information can be found in data tree returned by libyang call ly_ctx_info() that should be used on context retrieved from a Sysrepo connection.

Schema API