summaryrefslogtreecommitdiffstats
path: root/lib/northbound_cli.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-01-04 22:08:10 +0100
committerRenato Westphal <renato@opensourcerouting.org>2019-01-18 19:15:41 +0100
commit37345802af89567a5238d8894c0ef4e273c9d0c0 (patch)
treeab92668791bea95ba184de7e792399aeb05cd76f /lib/northbound_cli.c
parentlib: introduce new YANG helper function (diff)
downloadfrr-37345802af89567a5238d8894c0ef4e273c9d0c0.tar.xz
frr-37345802af89567a5238d8894c0ef4e273c9d0c0.zip
lib: peform only partial YANG validation when displaying operational data
When lyd_validate() is used with the LYD_OPT_DATA option, full YANG validation is performed. As a side-effect to this, default nodes are created, which is not desirable when displaying operational data since configuration nodes can also be created. Use LYD_OPT_GET option to resolve this problem. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/northbound_cli.c')
-rw-r--r--lib/northbound_cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c
index 33035de31..917b04810 100644
--- a/lib/northbound_cli.c
+++ b/lib/northbound_cli.c
@@ -1297,7 +1297,7 @@ DEFPY (show_yang_operational_data,
yang_dnode_free(dnode);
return CMD_WARNING;
}
- lyd_validate(&dnode, LYD_OPT_DATA | LYD_OPT_DATA_NO_YANGLIB, ly_ctx);
+ lyd_validate(&dnode, LYD_OPT_GET, ly_ctx);
/* Display the data. */
if (lyd_print_mem(&strp, dnode, format,