Added synatctic check for yang status: current, deprectated or obsolete

This commit is contained in:
Olof Hagsand 2019-03-23 13:23:50 +01:00
parent 69dcc721a9
commit 0c0efd4037
2 changed files with 10 additions and 0 deletions

View file

@ -50,6 +50,7 @@
```
### Minor changes
* Added synatctic check for yang status: current, deprectated or obsolete.
* Added CLICON_NACM_MODE "internal-rpc" which is for RPC functionality only, ie no module or data-node read-write functionality. This is for backward compatibility with Clixon 3. (A reduced-functionality "internal")
* Made Makefile concurrent so that it can be compiled with -jN
* Added flags to example backend to control its behaviour:

View file

@ -3032,6 +3032,15 @@ ys_parse_sub(yang_stmt *ys,
}
cv_uint32_set(ys->ys_cv, date);
break;
case Y_STATUS: /* RFC7950 7.21.2: "current", "deprecated", or "obsolete". */
if (strcmp(ys->ys_argument, "current") &&
strcmp(ys->ys_argument, "deprecated") &&
strcmp(ys->ys_argument, "obsolete")){
clicon_err(OE_YANG, errno, "Invalid status: \"%s\", expected current, deprecated, or obsolete", ys->ys_argument);
goto done;
}
break;
case Y_UNKNOWN: /* XXX This code assumes ymod already loaded
but it may not be */
if (extra == NULL)