Commit Graph

4 Commits

Author SHA1 Message Date
Renato Westphal
5e02643a64 lib: make it possible to create YANG data nodes containing state data
By default the data nodes created by yang_dnode_new() could contain
only configuration data (LYD_OPT_CONFIG). Add a 'config_only' option
to yang_dnode_new() so that it can create data nodes containing both
configuration and state data.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-26 17:35:58 -02:00
Renato Westphal
80243aef05 lib: don't fetch schema information when creating yang_data structures
Prefetching the schema node when creating yang_data structures is
expensive, and in most cases we don't need that information. In that case,
fetch the schema information only when necessary to improve performance
when fetching operational data.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-11-26 17:35:58 -02:00
David Lamparter
3a11599cdc yang: embed models into binaries
This bakes our YANG models straight into the library/daemons, so they
don't need to be loaded from /usr/share/yang.  This makes the
installation quite a bit more robust, as well as gets us halfway to
running uninstalled.  (The other half is baking in the extension type
module.)

The /usr/share/yang directory is still searched as a fallback, as well
as for the experimental YANG model translator.  This is likely to stay
as is for the time being.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-11-19 23:45:24 +01:00
Renato Westphal
1c2facd12d lib: introduce new northbound API
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-10-27 16:16:12 -02:00