| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
A YANG list that contains both configuration and state data must have
the following callbacks: create(), delete(), get_next(), get_keys()
and lookup_entry().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename yang_snodes_iterate() to yang_snodes_iterate_subtree() and
expose it in the public API.
* Rename yang_module_snodes_iterate() to yang_snodes_iterate_module().
* Rename yang_all_snodes_iterate() to yang_snodes_iterate_all().
* Make it possible to stop the iteration at any time by returning
YANG_ITER_STOP in the iteration callbacks.
* Make the iteration callbacks accept only one user argument and not
two.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases it will be necessary to load all FRR native modules.
Examples:
* vtysh needs to load all YANG modules so that it can manipulate data
from all daemons.
* The gen_northbound_callbacks tool will need to load all YANG modules
since augmentations from one module can have an effect in the required
northbound callbacks of other modules.
The new yang_module_load_all() function provides this functionality.
As a side note, the "frr_native_modules" will need to be updated every
time we add a new YANG module to FRR.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
| |
For convenience, make yang_dnode_free() remove the entire data tree and
not only the data node given as a parameter.
Also, add a null-pointer check on nb_config_replace() before calling
yang_dnode_free().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
| |
Cosmetic change to improve code readability a bit. No binary changes.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|