Changes in clixon-config.yang:
* Removed obsolete options:
* `CLICON_YANG_LIST_CHECK`
* `CLICON_RESTCONF_PATH` (moved to restconf/fcgi-path)
* Fixed: Configure option `CLICON_RESTCONF_PRETTY` was marked as obsolete but was still used.
* `CLICON_RESTCONF_PRETTY` is now obsolete for sure
* Instead restconf/pretty is used with API function restconf_pretty_get()
This commit is contained in:
parent
32930f4f6b
commit
3117332ddd
16 changed files with 81 additions and 66 deletions
|
|
@ -428,6 +428,13 @@ clicon_nacm_cache_set(clicon_handle h,
|
|||
/*! Get YANG specification for Clixon system options and features
|
||||
* Must use hash functions directly since they are not strings.
|
||||
* Example: features are typically accessed directly in the config tree.
|
||||
* @code
|
||||
* cxobj *x = NULL;
|
||||
* while ((x = xml_child_each(clicon_conf_xml(h), x, CX_ELMNT)) != NULL) {
|
||||
* if (strcmp(xml_name(x), "CLICON_YANG_DIR") != 0)
|
||||
* break;
|
||||
* }
|
||||
* @endcode
|
||||
*/
|
||||
cxobj *
|
||||
clicon_conf_xml(clicon_handle h)
|
||||
|
|
@ -454,6 +461,9 @@ clicon_conf_xml_set(clicon_handle h,
|
|||
* That is, get the XML of clixon-config/restconf container of clixon-config.yang
|
||||
* @param[in] h Clicon handle
|
||||
* @retval x XML tree containing restconf xml node from clixon-restconf.yang
|
||||
* @code
|
||||
* cxobj *xrestconf = clicon_conf_restconf(h);
|
||||
* @endcode
|
||||
* @note The clixon-restconf.yang instance can also be a part of the running datastore if
|
||||
* CLICON_BACKEND_RESTCONF_PROCESS is true
|
||||
*/
|
||||
|
|
@ -472,6 +482,9 @@ clicon_conf_restconf(clicon_handle h)
|
|||
* That is, get the XML of clixon-config/clispec container of clixon-config.yang
|
||||
* @param[in] h Clicon handle
|
||||
* @retval x XML tree containing clispec xml node from clixon-clispec.yang
|
||||
* @code
|
||||
* cxobj *xclispec = clicon_conf_clispec(h);
|
||||
* @endcode
|
||||
*/
|
||||
cxobj *
|
||||
clicon_conf_clispec(clicon_handle h)
|
||||
|
|
|
|||
|
|
@ -1201,7 +1201,7 @@ yang_find_schemanode(yang_stmt *yn,
|
|||
return ysmatch;
|
||||
}
|
||||
|
||||
/*! Given a yang statement, find the prefix associated to this module
|
||||
/*! Given a yang statement, or module itself, find the prefix associated to this module
|
||||
*
|
||||
* @param[in] ys Yang statement in module tree (or module itself)
|
||||
* @retval NULL No prefix found. This is an error
|
||||
|
|
|
|||
|
|
@ -1260,8 +1260,7 @@ ys_schemanode_check(yang_stmt *ys,
|
|||
* Verify the following rule:
|
||||
* RFC 7950 7.8.2: The "key" statement, which MUST be present if the list represents
|
||||
* configuration and MAY be present otherwise
|
||||
* Unless CLICON_YANG_LIST_CHECK is false (obsolete)
|
||||
* OR it is the "errors" rule of the ietf-restconf spec which seems to be a special case.
|
||||
* Unless it is the "errors" rule of the ietf-restconf spec which seems to be a special case.
|
||||
*/
|
||||
static int
|
||||
ys_list_check(clicon_handle h,
|
||||
|
|
@ -1289,18 +1288,11 @@ ys_list_check(clicon_handle h,
|
|||
/* Except nokey exceptions such as rrc 8040 yang-data */
|
||||
if (!yang_flag_get(yroot, YANG_FLAG_NOKEY)){
|
||||
/* Note obsolete */
|
||||
if (clicon_option_bool(h, "CLICON_YANG_LIST_CHECK")){
|
||||
clicon_log(LOG_ERR, "Error: LIST \"%s\" in module \"%s\" lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)",
|
||||
yang_argument_get(ys),
|
||||
yang_argument_get(ymod)
|
||||
);
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
clicon_log(LOG_WARNING, "Warning: LIST \"%s\" in module \"%s\" lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)",
|
||||
yang_argument_get(ys),
|
||||
yang_argument_get(ymod)
|
||||
);
|
||||
clicon_log(LOG_ERR, "Error: LIST \"%s\" in module \"%s\" lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)",
|
||||
yang_argument_get(ys),
|
||||
yang_argument_get(ymod)
|
||||
);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
/* Traverse subs */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue