Added synatctic check for yang status: current, deprectated or obsolete
This commit is contained in:
parent
69dcc721a9
commit
0c0efd4037
2 changed files with 10 additions and 0 deletions
|
|
@ -50,6 +50,7 @@
|
||||||
```
|
```
|
||||||
|
|
||||||
### Minor changes
|
### 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")
|
* 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
|
* Made Makefile concurrent so that it can be compiled with -jN
|
||||||
* Added flags to example backend to control its behaviour:
|
* Added flags to example backend to control its behaviour:
|
||||||
|
|
|
||||||
|
|
@ -3032,6 +3032,15 @@ ys_parse_sub(yang_stmt *ys,
|
||||||
}
|
}
|
||||||
cv_uint32_set(ys->ys_cv, date);
|
cv_uint32_set(ys->ys_cv, date);
|
||||||
break;
|
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
|
case Y_UNKNOWN: /* XXX This code assumes ymod already loaded
|
||||||
but it may not be */
|
but it may not be */
|
||||||
if (extra == NULL)
|
if (extra == NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue