Re-add option CLICON_NETCONF_DUPLICATE_ALLOW
This commit is contained in:
parent
c2841d6e40
commit
9a553bdcaa
4 changed files with 17 additions and 2 deletions
|
|
@ -29,6 +29,7 @@ Expected: June 2024
|
||||||
* CLI support for multiple inline commands separated by semi-colon
|
* CLI support for multiple inline commands separated by semi-colon
|
||||||
* New `clixon-config@2024-04-01.yang` revision
|
* New `clixon-config@2024-04-01.yang` revision
|
||||||
* Added options:
|
* Added options:
|
||||||
|
- `CLICON_NETCONF_DUPLICATE_ALLOW`: Disable duplicate check in NETCONF messages
|
||||||
- `CLICON_LOG_DESTINATION`: Default log destination
|
- `CLICON_LOG_DESTINATION`: Default log destination
|
||||||
- `CLICON_LOG_FILE`: Which file to log to if file logging
|
- `CLICON_LOG_FILE`: Which file to log to if file logging
|
||||||
- `CLICON_DEBUG`: Debug flags
|
- `CLICON_DEBUG`: Debug flags
|
||||||
|
|
|
||||||
|
|
@ -644,7 +644,10 @@ from_client_edit_config(clixon_handle h,
|
||||||
*/
|
*/
|
||||||
if ((ret = xml_yang_validate_minmax(xc, 1, &xret)) < 0)
|
if ((ret = xml_yang_validate_minmax(xc, 1, &xret)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret == 1 && (ret = xml_yang_validate_unique_recurse(xc, &xret)) < 0)
|
/* Disable duplicate check in NETCONF messages.*/
|
||||||
|
if (clicon_option_bool(h, "CLICON_NETCONF_DUPLICATE_ALLOW"))
|
||||||
|
;
|
||||||
|
else if (ret == 1 && (ret = xml_yang_validate_unique_recurse(xc, &xret)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
/* xmldb_put (difflist handling) requires list keys */
|
/* xmldb_put (difflist handling) requires list keys */
|
||||||
if (ret == 1 && (ret = xml_yang_validate_list_key_only(xc, &xret)) < 0)
|
if (ret == 1 && (ret = xml_yang_validate_list_key_only(xc, &xret)) < 0)
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ yang_ref_dec(yang_stmt *ys)
|
||||||
if (ys->ys_ref > 0)
|
if (ys->ys_ref > 0)
|
||||||
ys->ys_ref--;
|
ys->ys_ref--;
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
// done:
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ module clixon-config {
|
||||||
revision 2024-04-01 {
|
revision 2024-04-01 {
|
||||||
description
|
description
|
||||||
"Added options:
|
"Added options:
|
||||||
|
CLICON_NETCONF_DUPLICATE_ALLOW: Disable duplicate check in NETCONF messages.
|
||||||
CLICON_LOG_DESTINATION: Default log destination
|
CLICON_LOG_DESTINATION: Default log destination
|
||||||
CLICON_LOG_FILE: Which file to log to if file logging
|
CLICON_LOG_FILE: Which file to log to if file logging
|
||||||
CLICON_DEBUG: Debug flags.
|
CLICON_DEBUG: Debug flags.
|
||||||
|
|
@ -750,6 +751,16 @@ module clixon-config {
|
||||||
apart from NETCONF.
|
apart from NETCONF.
|
||||||
Only if CLICON_NETCONF_MONITORING";
|
Only if CLICON_NETCONF_MONITORING";
|
||||||
}
|
}
|
||||||
|
leaf CLICON_NETCONF_DUPLICATE_ALLOW {
|
||||||
|
type boolean;
|
||||||
|
default false;
|
||||||
|
description
|
||||||
|
"Disable duplicate check in NETCONF messages.
|
||||||
|
In Clixon 7.0, a stricter check of duplicate entries in incoming NETCONF messages was made.
|
||||||
|
More specifically: lists and leaf-lists with non-unique entries.
|
||||||
|
Enable to disable this check, and to allow duplicates in incoming NETCONF messages.
|
||||||
|
Note that this is an error by such a client, but there is some legacy code that uses this";
|
||||||
|
}
|
||||||
/* HTTP and Restconf */
|
/* HTTP and Restconf */
|
||||||
leaf CLICON_RESTCONF_API_ROOT {
|
leaf CLICON_RESTCONF_API_ROOT {
|
||||||
type string;
|
type string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue