sysrepo
1.4.168
YANG datastore
|
This binary allows to work with configuration in many ways such as importing, exporting, editing, and replacing (copying-from a file or datastore) it. It is also possible to send an rpc/action or a notification.
All operations are executed on a --datastore
(default running
, startup
, or operational
) or only a particular --module
and handle data in a supported --format
(default xml
, json
, or lyb
).
To import configuration, most often a file is supplied. Its format will be automatically detected based on the extension. If not applicable (or the data are read from STDIN), it can be manually determined.
One can also import startup configuration of a module.
Exported configuration can be printed into a file or simply to STDOUT.
Additionally, only a specific part of the configuration can be retrieved. Either the whole module data
or an XPath selection. Be careful, it is generally needed to enclose the XPath in " to prevent ' from being removed.
Data to merge (apply as an edit) can be provided in a file or using an arbitrary text editor. Also, when changing running
data, it is possible --lock
the datastore.
It is also possible to send an RPC or action from a file or using an editor. Any output is printed to STDOUT.
Sending a notification is performed in a similar way.
This operation can be used to replace a module or datastore data with the contents of either a file or another datastore.
The second command is, in-effect, a NETCONF <commit> because it copies the candidate
datastore into the default running
datastore.