Removed CLI generation for yang notifications (and other non-data yang nodes
This commit is contained in:
parent
6c48165340
commit
b443471e7b
2 changed files with 6 additions and 9 deletions
|
|
@ -110,6 +110,7 @@
|
||||||
* <!DOCTYPE (ie DTD) is not supported.
|
* <!DOCTYPE (ie DTD) is not supported.
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
* Removed CLI generation for yang notifications (and other non-data yang nodes)
|
||||||
* Some restconf error messages contained "rpc-reply" or "rpc-error" which have now been removed.
|
* Some restconf error messages contained "rpc-reply" or "rpc-error" which have now been removed.
|
||||||
* getopt return value changed from char to int (https://github.com/clicon/clixon/issues/58)
|
* getopt return value changed from char to int (https://github.com/clicon/clixon/issues/58)
|
||||||
* Netconf/Restconf RPC extra input arguments are ignored (https://github.com/clicon/clixon/issues/47)
|
* Netconf/Restconf RPC extra input arguments are ignored (https://github.com/clicon/clixon/issues/47)
|
||||||
|
|
|
||||||
|
|
@ -751,11 +751,6 @@ yang2cli_stmt(clicon_handle h,
|
||||||
|
|
||||||
if (yang_config(ys)){
|
if (yang_config(ys)){
|
||||||
switch (ys->ys_keyword){
|
switch (ys->ys_keyword){
|
||||||
case Y_GROUPING:
|
|
||||||
case Y_RPC:
|
|
||||||
case Y_AUGMENT:
|
|
||||||
return 0;
|
|
||||||
break;
|
|
||||||
case Y_CONTAINER:
|
case Y_CONTAINER:
|
||||||
if (yang2cli_container(h, ys, cbuf, gt, level) < 0)
|
if (yang2cli_container(h, ys, cbuf, gt, level) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -773,19 +768,20 @@ yang2cli_stmt(clicon_handle h,
|
||||||
if (yang2cli_leaf(h, ys, cbuf, gt, level, 1) < 0)
|
if (yang2cli_leaf(h, ys, cbuf, gt, level, 1) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
break;
|
break;
|
||||||
default:
|
case Y_SUBMODULE:
|
||||||
|
case Y_MODULE:
|
||||||
for (i=0; i<ys->ys_len; i++)
|
for (i=0; i<ys->ys_len; i++)
|
||||||
if ((yc = ys->ys_stmt[i]) != NULL)
|
if ((yc = ys->ys_stmt[i]) != NULL)
|
||||||
if (yang2cli_stmt(h, yc, cbuf, gt, level+1) < 0)
|
if (yang2cli_stmt(h, yc, cbuf, gt, level+1) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
break;
|
break;
|
||||||
|
default: /* skip */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
done:
|
done:
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Generate CLI code for Yang specification
|
/*! Generate CLI code for Yang specification
|
||||||
|
|
@ -814,7 +810,7 @@ yang2cli(clicon_handle h,
|
||||||
clicon_err(OE_XML, errno, "cbuf_new");
|
clicon_err(OE_XML, errno, "cbuf_new");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* Traverse YANG specification: loop through statements */
|
/* Traverse YANG, loop through all modules and generate CLI */
|
||||||
for (i=0; i<yspec->yp_len; i++)
|
for (i=0; i<yspec->yp_len; i++)
|
||||||
if ((ymod = yspec->yp_stmt[i]) != NULL){
|
if ((ymod = yspec->yp_stmt[i]) != NULL){
|
||||||
if (yang2cli_stmt(h, ymod, cbuf, gt, 0) < 0)
|
if (yang2cli_stmt(h, ymod, cbuf, gt, 0) < 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue