* Pushed tag to 4.0.1.PRE
* Restconf RFC 8040 increased feature compliance
* Cache-Control: no-cache added in HTTP responses (RFC Section 5.5)
* Restconf monitoring capabilities (RFC Section 9.1)
* Added support for Yang extensions
* New plugin callback: ca_extension
* Main backend example includes example code on how to implement a Yang extension in a plugin.
* JSON changes
* Non-pretty-print output removed all extra spaces.
* Example: `{"nacm-example:x": 42}` --> {"nacm-example:x":42}`
* Empty JSON container changed from `null` to `{}`.
* Empty list and leafs remain as `null`
* Removed unnecessary configure dependencies
* libnsl, libcrypt, libm, if_vlan,...
* pseudo-plugin added, to enable callbacks also for main programs. Useful for extensions
* Yang Unique statements with multiple schema identifiers did not work on some platforms due to memory error.
This commit is contained in:
parent
fe46a0e093
commit
e7b60619da
60 changed files with 1619 additions and 568 deletions
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
%token MY_EOF
|
||||
%token SQ /* Single quote: ' */
|
||||
%token SEP /* Separators (at least one) */
|
||||
%token <string> CHARS
|
||||
%token <string> IDENTIFIER
|
||||
%token <string> BOOL
|
||||
|
|
@ -1540,26 +1541,33 @@ deviate_substmt : type_stmt { clicon_debug(2,"deviate-substmt -> type-st
|
|||
;
|
||||
|
||||
|
||||
/* For extensions XXX: we just drop the data */
|
||||
unknown_stmt : ustring ':' ustring ';'
|
||||
/* Represents the usage of an extension
|
||||
unknown-statement = prefix ":" identifier [sep string] optsep
|
||||
(";" /
|
||||
"{" optsep
|
||||
*((yang-stmt / unknown-statement) optsep)
|
||||
"}") stmt
|
||||
*
|
||||
*/
|
||||
unknown_stmt : ustring ':' ustring optsep ';'
|
||||
{ char *id; if ((id=string_del_join($1, ":", $3)) == NULL) _YYERROR("unknown_stmt");
|
||||
if (ysp_add(_yy, Y_UNKNOWN, id, NULL) == NULL) _YYERROR("unknown_stmt");
|
||||
clicon_debug(2,"unknown-stmt -> ustring : ustring");
|
||||
}
|
||||
| ustring ':' ustring string ';'
|
||||
| ustring ':' ustring SEP string optsep ';'
|
||||
{ char *id; if ((id=string_del_join($1, ":", $3)) == NULL) _YYERROR("unknown_stmt");
|
||||
if (ysp_add(_yy, Y_UNKNOWN, id, $4) == NULL){ _YYERROR("unknwon_stmt"); }
|
||||
if (ysp_add(_yy, Y_UNKNOWN, id, $5) == NULL){ _YYERROR("unknwon_stmt"); }
|
||||
clicon_debug(2,"unknown-stmt -> ustring : ustring string");
|
||||
}
|
||||
| ustring ':' ustring
|
||||
| ustring ':' ustring optsep
|
||||
{ char *id; if ((id=string_del_join($1, ":", $3)) == NULL) _YYERROR("unknown_stmt");
|
||||
if (ysp_add_push(_yy, Y_UNKNOWN, id, NULL) == NULL) _YYERROR("unknown_stmt"); }
|
||||
'{' yang_stmts '}'
|
||||
{ if (ystack_pop(_yy) < 0) _YYERROR("unknown_stmt");
|
||||
clicon_debug(2,"unknown-stmt -> ustring : ustring { yang-stmts }"); }
|
||||
| ustring ':' ustring string
|
||||
| ustring ':' ustring SEP string optsep
|
||||
{ char *id; if ((id=string_del_join($1, ":", $3)) == NULL) _YYERROR("unknown_stmt");
|
||||
if (ysp_add_push(_yy, Y_UNKNOWN, id, $4) == NULL) _YYERROR("unknown_stmt"); }
|
||||
if (ysp_add_push(_yy, Y_UNKNOWN, id, $5) == NULL) _YYERROR("unknown_stmt"); }
|
||||
'{' yang_stmts '}'
|
||||
{ if (ystack_pop(_yy) < 0) _YYERROR("unknown_stmt");
|
||||
clicon_debug(2,"unknown-stmt -> ustring : ustring string { yang-stmts }"); }
|
||||
|
|
@ -1815,6 +1823,11 @@ node_identifier : IDENTIFIER
|
|||
identifier_ref : node_identifier { $$=$1;}
|
||||
;
|
||||
|
||||
optsep : SEP
|
||||
|
|
||||
;
|
||||
|
||||
|
||||
stmtend : ';'
|
||||
| '{' '}'
|
||||
| '{' unknown_stmt '}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue