summaryrefslogtreecommitdiff
path: root/lib/yang_translator.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-02 21:57:20 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-11-26 17:35:58 -0200
commit5e02643a64fb6aaaf95f6f9049020f392b5563d5 (patch)
treedfb4c936b5ed11d9cfb0f9f6e8a2daf02e41f3e5 /lib/yang_translator.c
parent80243aef050c1f882a169b402ff5c50fed63b451 (diff)
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>
Diffstat (limited to 'lib/yang_translator.c')
-rw-r--r--lib/yang_translator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yang_translator.c b/lib/yang_translator.c
index 27b92a0e6b..c41a8f3eea 100644
--- a/lib/yang_translator.c
+++ b/lib/yang_translator.c
@@ -351,7 +351,7 @@ int yang_translate_dnode(const struct yang_translator *translator, int dir,
ly_ctx = ly_native_ctx;
else
ly_ctx = translator->ly_ctx;
- new = yang_dnode_new(ly_ctx);
+ new = yang_dnode_new(ly_ctx, false);
/* Iterate over all nodes from the data tree. */
LY_TREE_FOR (*dnode, root) {