* Fixed: [State XML validation error when CLICON_MODULE_LIBRARY_RFC7895=true and ietf-yang-libra$
* Removed obsolete option: `CLICON_MODULE_LIBRARY_RFC7895' * Obsolete config options given in the confi file are considered an error * Added section in CONTRIBUTING relating to optimzation * Changed reset merge to implicit default values. * This avoids a potential overwriting of explicitly set default values in the existing config * Adapted some code to [Make cligen_* functions const ](https://github.com/clicon/cligen/pull/83) * Test: fixed test for * Fixed: [datamodel tree generated from basemodel tree is not proper when a list has more than one key and key is of enum type](https://github.com/clicon/clixon/issues/417)
This commit is contained in:
parent
7868cf0a0d
commit
d358387d39
13 changed files with 77 additions and 59 deletions
|
|
@ -276,6 +276,7 @@ parse_configfile(clicon_handle h,
|
|||
cxobj *xt = NULL;
|
||||
cxobj *xc = NULL;
|
||||
cxobj *x = NULL;
|
||||
yang_stmt *y;
|
||||
char *name;
|
||||
char *body;
|
||||
clicon_hash_t *copt = clicon_options(h);
|
||||
|
|
@ -357,6 +358,17 @@ parse_configfile(clicon_handle h,
|
|||
xe = NULL;
|
||||
}
|
||||
}
|
||||
/* Check obsolete options before default expansion */
|
||||
x = NULL;
|
||||
while ((x = xml_child_each(xt, x, CX_ELMNT)) != NULL) {
|
||||
if ((y = xml_spec(x)) != NULL){
|
||||
if ((yang_find(y, Y_STATUS, "obsolete")) != NULL){
|
||||
clicon_err(OE_CFG, 0, "Clixon option %s is obsolete but given in the config file which is considered an error",
|
||||
xml_name(x));
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (xml_default_recurse(xt, 0) < 0)
|
||||
goto done;
|
||||
if ((ret = xml_yang_validate_add(h, xt, &xerr)) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue