add state-path kludge to cligen frontend bind statement as well
This commit is contained in:
parent
08c4a424ca
commit
b4c591a985
2 changed files with 14 additions and 1 deletions
|
|
@ -727,8 +727,21 @@ clicon_rpc_get(clicon_handle h,
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
yspec = clicon_dbspec_yang(h);
|
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)
|
if ((ret = xml_bind_yang(xd, YB_MODULE, yspec, &xerr)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
#ifdef USE_STATE_PATH_KLUDGE
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (ret == 0){
|
if (ret == 0){
|
||||||
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
|
if ((xd = xpath_first(xerr, NULL, "rpc-error")) == NULL){
|
||||||
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
|
clicon_err(OE_XML, ENOENT, "Expected rpc-error tag but none found(internal)");
|
||||||
|
|
|
||||||
|
|
@ -726,7 +726,7 @@ module clixon-config {
|
||||||
"For get state commands, if the select xpath is equal (or its beginning)
|
"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
|
is equal to the path in this option, then yang binding, sorting, default
|
||||||
values is skipped.
|
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
|
This is a temporary option which will go away in future releases, therefore
|
||||||
marked as obsolete.";
|
marked as obsolete.";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue