removed state path kludge

This commit is contained in:
Olof hagsand 2020-05-05 17:13:38 +02:00
parent bc0eb921d0
commit f9e1fe5de7
8 changed files with 24 additions and 70 deletions

View file

@ -248,20 +248,6 @@ clixon_plugin_statedata_all(clicon_handle h,
if (debug)
clicon_log_xml(LOG_DEBUG, x, "%s STATE:", __FUNCTION__);
#endif
#ifdef USE_STATE_PATH_KLUDGE
/* This kludge skips all yang binding and validation of paths beginning with a
* specific prefix
* Note that there are many problems with this kludge.
*/
{
char *kpath;
if (xpath &&
(kpath = clicon_option_str(h, "CLICON_STATE_PATH_KLUDGE")) != NULL &&
strncmp(xpath, kpath, strlen(kpath)) == 0){
}
else {
#endif /* USE_STATE_PATH_KLUDGE */
/* XXX: ret == 0 invalid yang binding should be handled as internal error */
if (xml_bind_yang(x, YB_MODULE, yspec, NULL) < 0)
goto done;
@ -269,10 +255,6 @@ clixon_plugin_statedata_all(clicon_handle h,
goto done;
if (xml_default_recurse(x) < 0)
goto done;
#ifdef USE_STATE_PATH_KLUDGE
}
}
#endif
if ((ret = netconf_trymerge(x, yspec, xret)) < 0)
goto done;
if (ret == 0)