Revert with-defaults option,

Added clarifying NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL compile-time option instead
This commit is contained in:
Olof hagsand 2022-12-08 20:27:30 +01:00
parent 6baa904039
commit 571e26e0d6
2 changed files with 28 additions and 11 deletions

View file

@ -164,3 +164,30 @@
* Consider moving to configure.ac(compile-time) or to clixon-config.yang(run-time) * Consider moving to configure.ac(compile-time) or to clixon-config.yang(run-time)
*/ */
#define PRETTYPRINT_INDENT 3 #define PRETTYPRINT_INDENT 3
/*! Set backward compatibility for NETCONF get/get-config <with-defaults> parameter behavior
*
* This option sets backward-compability that has to do with an inconsistency
* between the two following concepts defined in RFC 6243:
* - Default-Handling Basic Modes (Section 2 in RFC 6243)
* - Retrieval of Default Data (Section 3 in RFC 6243)
*
* Before Clixon 6.0 RFC 6243 Clixon had a non-RFC with-defaults behavior:
* - Default-Handling Basic Mode is "explicit" (it does not store default values)
* - Retrieval of Default data is "report-all" (all default values are filled in)
*
* After the RFC6243 implementation introduced in 6.0, Clixon implemented the <with-defaults>
* parameter for all get/config but retained the pre-6.0 default get/get-config behaviour.
* - Default-Handling Basic Mode is "explicit" (announced as a capability)
* - Retrieval of Default data is "report-all"
*
* The 6.0 behaviour is inconsistent and therefore in Clixon 6.1 the default retrieval data
* is changed to "explicit" to be consistent with the basic mode:
* - Default-Handling Basic Mode is "explicit"
* - Retrieval of Default data is "explicit" <---
*
* This may lead to changes in behavior for clients retrieving configs without an explicit
* <with-defaults> parameter.
* To keep the previous behavior (as in 6.0) set this option with #define
*/
#undef NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL

View file

@ -49,7 +49,7 @@ module clixon-config {
revision 2022-12-01 { revision 2022-12-01 {
description description
"Added option: "Added option:
CLICON_NETCONF_WITHDEFAULTS_REPORTALL <nothing yet>
Released in Clixon 6.1"; Released in Clixon 6.1";
} }
revision 2022-11-01 { revision 2022-11-01 {
@ -550,16 +550,6 @@ module clixon-config {
RFC6242 for example. RFC6242 for example.
This only applies to the external NETCONF"; This only applies to the external NETCONF";
} }
leaf CLICON_NETCONF_WITHDEFAULTS_REPORTALL{
type boolean;
default "false";
description
"This option controls the basic mode retrieval defined in:
RFC 6243: With-defaults Capability for NETCONF
NETCONF with-defaults basic mode retrieval is set as follows:
If false, set to explicit (this is default)
If true, set to report-all (this is backward-compatible)";
}
leaf CLICON_RESTCONF_API_ROOT { leaf CLICON_RESTCONF_API_ROOT {
type string; type string;
default "/restconf"; default "/restconf";