From b4c591a98560e59ad4bf6e2abc5055b9ac9e943f Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 2 May 2020 10:37:02 +0200 Subject: [PATCH] add state-path kludge to cligen frontend bind statement as well --- lib/src/clixon_proto_client.c | 13 +++++++++++++ yang/clixon/clixon-config@2020-02-22.yang | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/src/clixon_proto_client.c b/lib/src/clixon_proto_client.c index 428de77b..7713c87a 100644 --- a/lib/src/clixon_proto_client.c +++ b/lib/src/clixon_proto_client.c @@ -727,8 +727,21 @@ clicon_rpc_get(clicon_handle h, } else{ yspec = clicon_dbspec_yang(h); +#ifdef USE_STATE_PATH_KLUDGE + { + char *kpath; + if (xpath && + (kpath = clicon_option_str(h, "CLICON_STATE_PATH_KLUDGE")) != NULL){ + if (strncmp(xpath, kpath, strlen(kpath)) == 0) + ; + } + else +#endif /* USE_STATE_PATH_KLUDGE */ if ((ret = xml_bind_yang(xd, YB_MODULE, yspec, &xerr)) < 0) goto done; +#ifdef USE_STATE_PATH_KLUDGE + } +#endif if (ret == 0){ if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){ clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)"); diff --git a/yang/clixon/clixon-config@2020-02-22.yang b/yang/clixon/clixon-config@2020-02-22.yang index 8cbfc43e..73205138 100644 --- a/yang/clixon/clixon-config@2020-02-22.yang +++ b/yang/clixon/clixon-config@2020-02-22.yang @@ -726,7 +726,7 @@ module clixon-config { "For get state commands, if the select xpath is equal (or its beginning) is equal to the path in this option, then yang binding, sorting, default values is skipped. - Note you need to set USE_STATE_PATH_KLUDGE compile option to use this. + Note you need to set USE_STATE_PATH_KLUDGE compile option This is a temporary option which will go away in future releases, therefore marked as obsolete."; }