* Error-type changed from protocol to application for data-not-unique netconf/restconf errors

* Added new revision of main example yang: `clixon-example@2020-12-01.yang`
* Fixed [YANG: key statement in rpc/notification list #148](https://github.com/clicon/clixon/issues/148)
  * Do not check uniqueness among lists without keys
This commit is contained in:
Olof hagsand 2020-12-01 18:56:38 +01:00
parent 1cd6d37fa1
commit e46f6f4a36
11 changed files with 275 additions and 26 deletions

View file

@ -2853,7 +2853,7 @@ yang_config(yang_stmt *ys)
*
* config statement is default true.
* @param[in] ys Yang statement
* @retval 0 Node or one of its ancestor has config false
* @retval 0 Node or one of its ancestor has config false or is RPC or notification
* @retval 1 Neither node nor any of its ancestors has config false
*/
int
@ -2865,6 +2865,8 @@ yang_config_ancestor(yang_stmt *ys)
do {
if (yang_config(yp) == 0)
return 0;
if (yang_keyword_get(yp) == Y_INPUT || yang_keyword_get(yp) == Y_OUTPUT || yang_keyword_get(yp) == Y_NOTIFICATION)
return 0;
} while((yp = yang_parent_get(yp)) != NULL);
return 1;
}