diff --git a/include/clixon_custom.h b/include/clixon_custom.h index c04d2432..286a4f26 100644 --- a/include/clixon_custom.h +++ b/include/clixon_custom.h @@ -164,3 +164,30 @@ * Consider moving to configure.ac(compile-time) or to clixon-config.yang(run-time) */ #define PRETTYPRINT_INDENT 3 + +/*! Set backward compatibility for NETCONF get/get-config 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 + * 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 + * parameter. + * To keep the previous behavior (as in 6.0) set this option with #define + */ +#undef NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL diff --git a/yang/clixon/clixon-config@2022-12-01.yang b/yang/clixon/clixon-config@2022-12-01.yang index da76fb52..722e30dc 100644 --- a/yang/clixon/clixon-config@2022-12-01.yang +++ b/yang/clixon/clixon-config@2022-12-01.yang @@ -49,7 +49,7 @@ module clixon-config { revision 2022-12-01 { description "Added option: - CLICON_NETCONF_WITHDEFAULTS_REPORTALL + Released in Clixon 6.1"; } revision 2022-11-01 { @@ -550,16 +550,6 @@ module clixon-config { RFC6242 for example. 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 { type string; default "/restconf";