Conditional compilation to support report-all default retrieval

This commit is contained in:
Jan-Olof Carlson 2022-12-20 10:14:09 +00:00
parent 979d5d9ca2
commit e8048fa434
2 changed files with 10 additions and 3 deletions

View file

@ -815,9 +815,16 @@ get_common(clicon_handle h,
cxobj *xfind; cxobj *xfind;
uint32_t offset = 0; uint32_t offset = 0;
uint32_t limit = 0; uint32_t limit = 0;
withdefaults_type wdef = WITHDEFAULTS_EXPLICIT; withdefaults_type wdef;
char *wdefstr; char *wdefstr;
#ifdef NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL
/* Clixon 6.0 backward compatibly for NETCONF get/get-config behavior */
wdef = WITHDEFAULTS_REPORT_ALL;
#else
wdef = WITHDEFAULTS_EXPLICIT;
#endif
clicon_debug(1, "%s", __FUNCTION__); clicon_debug(1, "%s", __FUNCTION__);
username = clicon_username_get(h); username = clicon_username_get(h);
if ((yspec = clicon_dbspec_yang(h)) == NULL){ if ((yspec = clicon_dbspec_yang(h)) == NULL){

View file

@ -133,9 +133,9 @@ typedef enum framing_type netconf_framing_type;
* @see RFC 6243 * @see RFC 6243
*/ */
enum withdefaults_type{ enum withdefaults_type{
WITHDEFAULTS_REPORT_ALL = 0, /* default */ WITHDEFAULTS_REPORT_ALL = 0, /* default behavior: <= Clixon 6.0 */
WITHDEFAULTS_TRIM, WITHDEFAULTS_TRIM,
WITHDEFAULTS_EXPLICIT, WITHDEFAULTS_EXPLICIT, /* default behavior: > Clixon 6.0 */
WITHDEFAULTS_REPORT_ALL_TAGGED WITHDEFAULTS_REPORT_ALL_TAGGED
}; };
typedef enum withdefaults_type withdefaults_type; typedef enum withdefaults_type withdefaults_type;