* New clixon-lib@2021-12-05.yang revision
* Extension `autocli-op` obsoleted and no longer supported
* You need to change to use clixon-autocli `hide`and `hide-show` instead.
* Translate as follows:
* `cl:autocli-op hide` -> `autocli:hide`
* `cl:autocli-op hide-database` -> `autocli:hide-show`
* `cl:autocli-op hide-database-auto-completion` -> `autocli:hide; autocli:hide-show`
This commit is contained in:
parent
081e6871b3
commit
e0bcca5405
14 changed files with 410 additions and 146 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -54,11 +54,19 @@ Planned: January, 2022
|
||||||
* `@datamodelstate` translated to `@basemodel, @remove:leafvar`
|
* `@datamodelstate` translated to `@basemodel, @remove:leafvar`
|
||||||
* Note: while @datamodel etc are backward compatible, the autocli redesign is NOT backward compatible
|
* Note: while @datamodel etc are backward compatible, the autocli redesign is NOT backward compatible
|
||||||
* see API changes
|
* see API changes
|
||||||
|
* Moved hide extensions from `clixon-lib` to `clixon-autocli`
|
||||||
|
|
||||||
### API changes on existing protocol/config features
|
### API changes on existing protocol/config features
|
||||||
|
|
||||||
Users may have to change how they access the system
|
Users may have to change how they access the system
|
||||||
|
|
||||||
|
* New `clixon-lib@2021-12-05.yang` revision
|
||||||
|
* Extension `autocli-op` obsoleted and no longer supported
|
||||||
|
* You need to change to use clixon-autocli `hide`and `hide-show` instead.
|
||||||
|
* Translate as follows:
|
||||||
|
* `cl:autocli-op hide` -> `autocli:hide`
|
||||||
|
* `cl:autocli-op hide-database` -> `autocli:hide-show`
|
||||||
|
* `cl:autocli-op hide-database-auto-completion` -> `autocli:hide; autocli:hide-show`
|
||||||
* New `clixon-config@2021-12-05.yang` revision
|
* New `clixon-config@2021-12-05.yang` revision
|
||||||
* Imported (as a sub-spec): clixon-clispec.yang
|
* Imported (as a sub-spec): clixon-clispec.yang
|
||||||
* Removed obsolete options:
|
* Removed obsolete options:
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,9 @@ co2apipath(cg_obj *co)
|
||||||
return cv_string_get(cv);;
|
return cv_string_get(cv);;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Append to cvv1 to cvv0
|
||||||
|
* @note if cvv0 is non-null, the first element of cvv1 is skipped
|
||||||
|
*/
|
||||||
static cvec*
|
static cvec*
|
||||||
cvec_append(cvec *cvv0,
|
cvec_append(cvec *cvv0,
|
||||||
cvec *cvv1)
|
cvec *cvv1)
|
||||||
|
|
@ -167,17 +170,14 @@ cli_xml2file(cxobj *xn,
|
||||||
int haselement;
|
int haselement;
|
||||||
char *val;
|
char *val;
|
||||||
char *encstr = NULL; /* xml encoded string */
|
char *encstr = NULL; /* xml encoded string */
|
||||||
char *opext = NULL;
|
int exist = 0;
|
||||||
|
|
||||||
if (xn == NULL)
|
if (xn == NULL)
|
||||||
goto ok;
|
goto ok;
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
if (yang_extension_value(xml_spec(xn), "hide-show", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
if (yang_extension_value(xml_spec(xn), "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0) {
|
goto done;
|
||||||
|
if (exist)
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
|
||||||
if ((opext != NULL) && ((strcmp(opext, "hide-database") == 0) || (strcmp(opext, "hide-database-auto-completion") == 0))){
|
|
||||||
goto ok;
|
|
||||||
}
|
|
||||||
name = xml_name(xn);
|
name = xml_name(xn);
|
||||||
namespace = xml_prefix(xn);
|
namespace = xml_prefix(xn);
|
||||||
switch(xml_type(xn)){
|
switch(xml_type(xn)){
|
||||||
|
|
@ -268,19 +268,16 @@ cli_xml2txt(cxobj *xn,
|
||||||
cxobj *xc = NULL;
|
cxobj *xc = NULL;
|
||||||
int children=0;
|
int children=0;
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
char *opext = NULL;
|
int exist = 0;
|
||||||
|
|
||||||
if (xn == NULL || fn == NULL){
|
if (xn == NULL || fn == NULL){
|
||||||
clicon_err(OE_XML, EINVAL, "xn or fn is NULL");
|
clicon_err(OE_XML, EINVAL, "xn or fn is NULL");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
if (yang_extension_value(xml_spec(xn), "hide-show", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
if (yang_extension_value(xml_spec(xn), "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0) {
|
goto done;
|
||||||
|
if (exist)
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
|
||||||
if ((opext != NULL) && ((strcmp(opext, "hide-database") == 0) || (strcmp(opext, "hide-database-auto-completion") == 0))){
|
|
||||||
goto ok;
|
|
||||||
}
|
|
||||||
xc = NULL; /* count children (elements and bodies, not attributes) */
|
xc = NULL; /* count children (elements and bodies, not attributes) */
|
||||||
while ((xc = xml_child_each(xn, xc, -1)) != NULL)
|
while ((xc = xml_child_each(xn, xc, -1)) != NULL)
|
||||||
if (xml_type(xc) == CX_ELMNT || xml_type(xc) == CX_BODY)
|
if (xml_type(xc) == CX_ELMNT || xml_type(xc) == CX_BODY)
|
||||||
|
|
@ -353,7 +350,7 @@ cli_auto_edit(clicon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* Find the matching cligen object
|
/* Find the matching cligen object
|
||||||
* Note, is complictead: either an instantiated tree (co_treeref_orig)
|
* Note, is complicated: either an instantiated tree (co_treeref_orig)
|
||||||
* or actual tree (co_ref)
|
* or actual tree (co_ref)
|
||||||
*/
|
*/
|
||||||
if ((co = cligen_co_match(cli_cligen(h))) != NULL){
|
if ((co = cligen_co_match(cli_cligen(h))) != NULL){
|
||||||
|
|
|
||||||
|
|
@ -134,11 +134,12 @@ cli_expand_var_generate(clicon_handle h,
|
||||||
cbuf *cb)
|
cbuf *cb)
|
||||||
{
|
{
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
char *api_path_fmt = NULL, *opext = NULL;
|
char *api_path_fmt = NULL;
|
||||||
|
int exist = 0;
|
||||||
|
|
||||||
if (yang_extension_value(ys, "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0)
|
if (yang_extension_value(ys, "hide", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (opext && strcmp(opext, "hide-database") == 0) {
|
if (exist) {
|
||||||
retval = 1;
|
retval = 1;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
@ -760,9 +761,10 @@ yang2cli_leaf(clicon_handle h,
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
char *helptext = NULL;
|
char *helptext = NULL;
|
||||||
char *s;
|
char *s;
|
||||||
char *opext = NULL;
|
|
||||||
int extralevel = 0;
|
int extralevel = 0;
|
||||||
autocli_listkw_t listkw;
|
autocli_listkw_t listkw;
|
||||||
|
int exist = 0;
|
||||||
|
|
||||||
/* description */
|
/* description */
|
||||||
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
||||||
|
|
@ -774,9 +776,6 @@ yang2cli_leaf(clicon_handle h,
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
}
|
}
|
||||||
cprintf(cb, "%*s", level*3, "");
|
cprintf(cb, "%*s", level*3, "");
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
|
||||||
if (yang_extension_value(ys, "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0)
|
|
||||||
goto done;
|
|
||||||
if (autocli_list_keyword(h, &listkw) < 0)
|
if (autocli_list_keyword(h, &listkw) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (listkw == AUTOCLI_LISTKW_ALL ||
|
if (listkw == AUTOCLI_LISTKW_ALL ||
|
||||||
|
|
@ -784,14 +783,12 @@ yang2cli_leaf(clicon_handle h,
|
||||||
cprintf(cb, "%s", yang_argument_get(ys));
|
cprintf(cb, "%s", yang_argument_get(ys));
|
||||||
yang2cli_helptext(cb, helptext);
|
yang2cli_helptext(cb, helptext);
|
||||||
cprintf(cb, " ");
|
cprintf(cb, " ");
|
||||||
if (opext && strcmp(opext, "hide") == 0){
|
if (yang_extension_value(ys, "hide", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
|
goto done;
|
||||||
|
if (exist){
|
||||||
cprintf(cb, ", hide{");
|
cprintf(cb, ", hide{");
|
||||||
extralevel = 1;
|
extralevel = 1;
|
||||||
}
|
}
|
||||||
if (opext && strcmp(opext, "hide-database-auto-completion") == 0){
|
|
||||||
cprintf(cb, ", hide-database-auto-completion{");
|
|
||||||
extralevel = 1;
|
|
||||||
}
|
|
||||||
if (yang2cli_var(h, ys, ys, helptext, cb) < 0)
|
if (yang2cli_var(h, ys, ys, helptext, cb) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
@ -832,9 +829,9 @@ yang2cli_container(clicon_handle h,
|
||||||
char *s;
|
char *s;
|
||||||
int compress = 0;
|
int compress = 0;
|
||||||
int hide_oc = 0;
|
int hide_oc = 0;
|
||||||
char *opext = NULL;
|
|
||||||
yang_stmt *ymod = NULL;
|
yang_stmt *ymod = NULL;
|
||||||
|
int exist = 0;
|
||||||
|
|
||||||
if (ys_real_module(ys, &ymod) < 0)
|
if (ys_real_module(ys, &ymod) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
/* If non-presence container && HIDE mode && only child is
|
/* If non-presence container && HIDE mode && only child is
|
||||||
|
|
@ -856,16 +853,11 @@ yang2cli_container(clicon_handle h,
|
||||||
}
|
}
|
||||||
if (cli_callback_generate(h, ys, cb) < 0)
|
if (cli_callback_generate(h, ys, cb) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
if (yang_extension_value(ys, "hide", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
|
||||||
if (yang_extension_value(ys, "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0)
|
|
||||||
goto done;
|
goto done;
|
||||||
if (opext != NULL && strcmp(opext, "hide") == 0){
|
if (exist){
|
||||||
cprintf(cb, ",hide");
|
cprintf(cb, ",hide");
|
||||||
}
|
}
|
||||||
if (opext != NULL && strcmp(opext, "hide-database-auto-completion") == 0){
|
|
||||||
cprintf(cb, ", hide-database-auto-completion");
|
|
||||||
}
|
|
||||||
cprintf(cb, ";{\n");
|
cprintf(cb, ";{\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -904,7 +896,7 @@ yang2cli_list(clicon_handle h,
|
||||||
char *helptext = NULL;
|
char *helptext = NULL;
|
||||||
char *s;
|
char *s;
|
||||||
int last_key = 0;
|
int last_key = 0;
|
||||||
char *opext = NULL;
|
int exist = 0;
|
||||||
|
|
||||||
cprintf(cb, "%*s%s", level*3, "", yang_argument_get(ys));
|
cprintf(cb, "%*s%s", level*3, "", yang_argument_get(ys));
|
||||||
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
if ((yd = yang_find(ys, Y_DESCRIPTION, NULL)) != NULL){
|
||||||
|
|
@ -916,15 +908,11 @@ yang2cli_list(clicon_handle h,
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
yang2cli_helptext(cb, helptext);
|
yang2cli_helptext(cb, helptext);
|
||||||
}
|
}
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
if (yang_extension_value(ys, "hide", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
if (yang_extension_value(ys, "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0)
|
|
||||||
goto done;
|
goto done;
|
||||||
if (opext != NULL && strcmp(opext, "hide") == 0){
|
if (exist){
|
||||||
cprintf(cb, ",hide");
|
cprintf(cb, ",hide");
|
||||||
}
|
}
|
||||||
if (opext != NULL && strcmp(opext, "hide-database-auto-completion") == 0){
|
|
||||||
cprintf(cb, ",hide-database-auto-completion");
|
|
||||||
}
|
|
||||||
/* Loop over all key variables */
|
/* Loop over all key variables */
|
||||||
cvk = yang_cvec_get(ys); /* Use Y_LIST cache, see ys_populate_list() */
|
cvk = yang_cvec_get(ys); /* Use Y_LIST cache, see ys_populate_list() */
|
||||||
cvi = NULL;
|
cvi = NULL;
|
||||||
|
|
|
||||||
|
|
@ -608,7 +608,6 @@ clicon_parse(clicon_handle h,
|
||||||
clicon_err_reset();
|
clicon_err_reset();
|
||||||
if ((ret = cligen_eval(ch, match_obj, cvv, callbacks)) < 0)
|
if ((ret = cligen_eval(ch, match_obj, cvv, callbacks)) < 0)
|
||||||
cli_handler_err(stdout);
|
cli_handler_err(stdout);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
|
||||||
|
|
@ -1038,9 +1038,9 @@ xml2cli(clicon_handle h,
|
||||||
yang_stmt *ys;
|
yang_stmt *ys;
|
||||||
int match;
|
int match;
|
||||||
char *body;
|
char *body;
|
||||||
char *opext = NULL;
|
|
||||||
int compress = 0;
|
int compress = 0;
|
||||||
autocli_listkw_t listkw;
|
autocli_listkw_t listkw;
|
||||||
|
int exist = 0;
|
||||||
|
|
||||||
if (autocli_list_keyword(h, &listkw) < 0)
|
if (autocli_list_keyword(h, &listkw) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
@ -1048,13 +1048,10 @@ xml2cli(clicon_handle h,
|
||||||
goto ok;
|
goto ok;
|
||||||
if ((ys = xml_spec(xn)) == NULL)
|
if ((ys = xml_spec(xn)) == NULL)
|
||||||
goto ok;
|
goto ok;
|
||||||
/* Look for autocli-op defined in clixon-lib.yang */
|
if (yang_extension_value(ys, "hide-show", CLIXON_AUTOCLI_NS, &exist, NULL) < 0)
|
||||||
if (yang_extension_value(xml_spec(xn), "autocli-op", CLIXON_LIB_NS, NULL, &opext) < 0) {
|
goto done;
|
||||||
|
if (exist)
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
|
||||||
if ((opext != NULL) && ((strcmp(opext, "hide-database") == 0) || (strcmp(opext, "hide-database-auto-completion") == 0))){
|
|
||||||
goto ok;
|
|
||||||
}
|
|
||||||
/* If leaf/leaf-list or presence container, then print line */
|
/* If leaf/leaf-list or presence container, then print line */
|
||||||
if (yang_keyword_get(ys) == Y_LEAF ||
|
if (yang_keyword_get(ys) == Y_LEAF ||
|
||||||
yang_keyword_get(ys) == Y_LEAF_LIST){
|
yang_keyword_get(ys) == Y_LEAF_LIST){
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ module clixon-example {
|
||||||
prefix ip;
|
prefix ip;
|
||||||
}
|
}
|
||||||
import iana-if-type {
|
import iana-if-type {
|
||||||
prefix ianaift;
|
prefix ianaift;
|
||||||
}
|
}
|
||||||
import ietf-datastores {
|
import ietf-datastores {
|
||||||
prefix ds;
|
prefix ds;
|
||||||
|
}
|
||||||
|
import clixon-autocli{
|
||||||
|
prefix autocli;
|
||||||
}
|
}
|
||||||
import clixon-lib{
|
|
||||||
prefix cl;
|
|
||||||
}
|
|
||||||
description
|
description
|
||||||
"Clixon example used as a part of the Clixon test suite.
|
"Clixon example used as a part of the Clixon test suite.
|
||||||
It can be used as a basis for making new Clixon applications.
|
It can be used as a basis for making new Clixon applications.
|
||||||
|
|
@ -57,7 +57,7 @@ module clixon-example {
|
||||||
}
|
}
|
||||||
leaf hidden{
|
leaf hidden{
|
||||||
type string;
|
type string;
|
||||||
cl:autocli-op hide;
|
autocli:hide;
|
||||||
}
|
}
|
||||||
leaf stat{
|
leaf stat{
|
||||||
description "Inline state data for example application";
|
description "Inline state data for example application";
|
||||||
|
|
@ -68,11 +68,11 @@ module clixon-example {
|
||||||
}
|
}
|
||||||
/* State data (not config) for the example application*/
|
/* State data (not config) for the example application*/
|
||||||
container state {
|
container state {
|
||||||
config false;
|
config false;
|
||||||
description "state data for the example application (must be here for example get operation)";
|
description "state data for the example application (must be here for example get operation)";
|
||||||
leaf-list op {
|
leaf-list op {
|
||||||
type string;
|
type string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
augment "/if:interfaces/if:interface" {
|
augment "/if:interfaces/if:interface" {
|
||||||
container my-status {
|
container my-status {
|
||||||
|
|
@ -88,38 +88,38 @@ module clixon-example {
|
||||||
}
|
}
|
||||||
/* yang extension implemented by the example backend code. */
|
/* yang extension implemented by the example backend code. */
|
||||||
extension e4 {
|
extension e4 {
|
||||||
description
|
description
|
||||||
"The first child of the ex:e4 (unknown) statement is inserted into
|
"The first child of the ex:e4 (unknown) statement is inserted into
|
||||||
the module as a regular data statement. This means that 'uses bar;'
|
the module as a regular data statement. This means that 'uses bar;'
|
||||||
in the ex:e4 statement below is a valid data node";
|
in the ex:e4 statement below is a valid data node";
|
||||||
argument arg;
|
argument arg;
|
||||||
}
|
}
|
||||||
grouping bar {
|
grouping bar {
|
||||||
leaf bar{
|
leaf bar{
|
||||||
type string;
|
type string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ex:e4 arg1{
|
ex:e4 arg1{
|
||||||
uses bar;
|
uses bar;
|
||||||
}
|
}
|
||||||
/* Example notification as used in RFC 5277 and RFC 8040 */
|
/* Example notification as used in RFC 5277 and RFC 8040 */
|
||||||
notification event {
|
notification event {
|
||||||
description "Example notification event.";
|
description "Example notification event.";
|
||||||
leaf event-class {
|
leaf event-class {
|
||||||
type string;
|
type string;
|
||||||
description "Event class identifier.";
|
description "Event class identifier.";
|
||||||
}
|
}
|
||||||
container reportingEntity {
|
container reportingEntity {
|
||||||
description "Event specific information.";
|
description "Event specific information.";
|
||||||
leaf card {
|
leaf card {
|
||||||
type string;
|
type string;
|
||||||
description "Line card identifier.";
|
description "Line card identifier.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
leaf severity {
|
leaf severity {
|
||||||
type string;
|
type string;
|
||||||
description "Event severity description.";
|
description "Event severity description.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rpc client-rpc {
|
rpc client-rpc {
|
||||||
description "Example local client-side RPC that is processed by the
|
description "Example local client-side RPC that is processed by the
|
||||||
|
|
@ -166,7 +166,7 @@ module clixon-example {
|
||||||
}
|
}
|
||||||
leaf y {
|
leaf y {
|
||||||
description
|
description
|
||||||
"If a leaf in the input tree has a 'mandatory' statement with the
|
"If a leaf in the input tree has a 'mandatory' statement with the
|
||||||
value 'true', the leaf MUST be present in an RPC invocation.";
|
value 'true', the leaf MUST be present in an RPC invocation.";
|
||||||
type string;
|
type string;
|
||||||
default "42";
|
default "42";
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@
|
||||||
*/
|
*/
|
||||||
#define CLIXON_CONF_NS "http://clicon.org/config"
|
#define CLIXON_CONF_NS "http://clicon.org/config"
|
||||||
#define CLIXON_LIB_NS "http://clicon.org/lib"
|
#define CLIXON_LIB_NS "http://clicon.org/lib"
|
||||||
|
#define CLIXON_AUTOCLI_NS "http://clicon.org/autocli"
|
||||||
#define CLIXON_RESTCONF_NS "http://clicon.org/restconf"
|
#define CLIXON_RESTCONF_NS "http://clicon.org/restconf"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ struct yang_stmt{
|
||||||
int ys_len; /* Number of children */
|
int ys_len; /* Number of children */
|
||||||
struct yang_stmt **ys_stmt; /* Vector of children statement pointers */
|
struct yang_stmt **ys_stmt; /* Vector of children statement pointers */
|
||||||
struct yang_stmt *ys_parent; /* Backpointer to parent: yang-stmt or yang-spec */
|
struct yang_stmt *ys_parent; /* Backpointer to parent: yang-stmt or yang-spec */
|
||||||
enum rfc_6020 ys_keyword; /* See clicon_yang_parse.tab.h */
|
enum rfc_6020 ys_keyword; /* */
|
||||||
|
|
||||||
char *ys_argument; /* String / argument depending on keyword */
|
char *ys_argument; /* String / argument depending on keyword */
|
||||||
uint16_t ys_flags; /* Flags according to YANG_FLAG_MARK and others */
|
uint16_t ys_flags; /* Flags according to YANG_FLAG_MARK and others */
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,8 @@ CLIXON_VERSION=@CLIXON_VERSION@
|
||||||
DATASTORE_TOP="config"
|
DATASTORE_TOP="config"
|
||||||
|
|
||||||
# clixon yang revisions occuring in tests
|
# clixon yang revisions occuring in tests
|
||||||
CLIXON_LIB_REV="2021-11-11"
|
CLIXON_AUTOCLI_REV="2021-12-05"
|
||||||
|
CLIXON_LIB_REV="2021-12-05"
|
||||||
CLIXON_CONFIG_REV="2021-11-11"
|
CLIXON_CONFIG_REV="2021-11-11"
|
||||||
CLIXON_RESTCONF_REV="2021-05-20"
|
CLIXON_RESTCONF_REV="2021-05-20"
|
||||||
CLIXON_EXAMPLE_REV="2020-12-01"
|
CLIXON_EXAMPLE_REV="2020-12-01"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Tests for using autocli extension defined in clixon-lib
|
# Tests for using autocli hide extension
|
||||||
# This is both a test of yang extensions and autocli
|
# This is both a test of yang extensions and autocli
|
||||||
# The extension is autocli-op and can take the value "hide" (maybe more)
|
|
||||||
# Try both inline and augmented mode
|
# Try both inline and augmented mode
|
||||||
# @see https://clixon-docs.readthedocs.io/en/latest/misc.html#extensions
|
# @see https://clixon-docs.readthedocs.io/en/latest/misc.html#extensions
|
||||||
# Magic line must be first in script (see README.md)
|
# Magic line must be first in script (see README.md)
|
||||||
|
|
@ -74,12 +73,12 @@ cat <<EOF > $fyang
|
||||||
module example {
|
module example {
|
||||||
namespace "urn:example:clixon";
|
namespace "urn:example:clixon";
|
||||||
prefix ex;
|
prefix ex;
|
||||||
import clixon-lib{
|
import clixon-autocli{
|
||||||
prefix cl;
|
prefix autocli;
|
||||||
}
|
}
|
||||||
|
|
||||||
grouping pg {
|
grouping pg {
|
||||||
cl:autocli-op hide; /* This is the extension */
|
autocli:hide;
|
||||||
|
autocli:hide-show;
|
||||||
leaf value{
|
leaf value{
|
||||||
description "a value";
|
description "a value";
|
||||||
type string;
|
type string;
|
||||||
|
|
@ -111,12 +110,6 @@ cat <<EOF > $fyang2
|
||||||
module example-augment {
|
module example-augment {
|
||||||
namespace "urn:example:augment";
|
namespace "urn:example:augment";
|
||||||
prefix aug;
|
prefix aug;
|
||||||
import example{
|
|
||||||
prefix ex;
|
|
||||||
}
|
|
||||||
import clixon-lib{
|
|
||||||
prefix cl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -145,8 +138,7 @@ set table parameter x
|
||||||
show config xml
|
show config xml
|
||||||
EOF
|
EOF
|
||||||
new "set table parameter hidden"
|
new "set table parameter hidden"
|
||||||
expectpart "$(cat $fin | $clixon_cli -f $cfg 2>&1)" 0 "set table parameter x" "<table xmlns=\"urn:example:clixon\"><parameter><name>x</name></parameter></table>"
|
expectpart "$(cat $fin | $clixon_cli -f $cfg 2>&1)" 0 "set table parameter x" "<table xmlns=\"urn:example:clixon\"></table>"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testvalue()
|
function testvalue()
|
||||||
|
|
@ -163,9 +155,8 @@ function testvalue()
|
||||||
set table parameter x value 42
|
set table parameter x value 42
|
||||||
show config xml
|
show config xml
|
||||||
EOF
|
EOF
|
||||||
new "set table parameter hidden leaf"
|
new "set table parameter hidden leaf2"
|
||||||
expectpart "$(cat $fin | $clixon_cli -f $cfg 2>&1)" 0 "<table xmlns=\"urn:example:clixon\"><parameter><name>x</name><value>42</value></parameter></table>"
|
expectpart "$(cat $fin | $clixon_cli -f $cfg 2>&1)" 0 "<table xmlns=\"urn:example:clixon\"><parameter><name>x</name></parameter></table>"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# INLINE MODE
|
# INLINE MODE
|
||||||
|
|
@ -176,33 +167,34 @@ testparam
|
||||||
# Second annotate /table/parameter/value
|
# Second annotate /table/parameter/value
|
||||||
cat <<EOF > $fyang
|
cat <<EOF > $fyang
|
||||||
module example {
|
module example {
|
||||||
namespace "urn:example:clixon";
|
namespace "urn:example:clixon";
|
||||||
prefix ex;
|
prefix ex;
|
||||||
import clixon-lib{
|
import clixon-autocli{
|
||||||
prefix cl;
|
prefix autocli;
|
||||||
}
|
}
|
||||||
container table{
|
container table{
|
||||||
list parameter{
|
list parameter{
|
||||||
key name;
|
key name;
|
||||||
leaf name{
|
leaf name{
|
||||||
type string;
|
type string;
|
||||||
}
|
}
|
||||||
leaf value{
|
leaf value{
|
||||||
cl:autocli-op hide; /* Here is the example */
|
autocli:hide;
|
||||||
description "a value";
|
autocli:hide-show;
|
||||||
type string;
|
description "a value";
|
||||||
}
|
type string;
|
||||||
list index{
|
}
|
||||||
key i;
|
list index{
|
||||||
leaf i{
|
key i;
|
||||||
type string;
|
leaf i{
|
||||||
}
|
type string;
|
||||||
leaf iv{
|
}
|
||||||
type string;
|
leaf iv{
|
||||||
}
|
type string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
@ -247,16 +239,16 @@ module example-augment {
|
||||||
import example{
|
import example{
|
||||||
prefix ex;
|
prefix ex;
|
||||||
}
|
}
|
||||||
import clixon-lib{
|
import clixon-autocli{
|
||||||
prefix cl;
|
prefix autocli;
|
||||||
}
|
}
|
||||||
augment "/ex:table/ex:parameter" {
|
augment "/ex:table/ex:parameter" {
|
||||||
cl:autocli-op hide;
|
autocli:hide;
|
||||||
|
autocli:hide-show;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
new "Test hidden parameter in table/param augment"
|
new "Test hidden parameter in table/param augment"
|
||||||
testparam
|
testparam
|
||||||
|
|
||||||
|
|
@ -269,11 +261,12 @@ module example-augment {
|
||||||
import example{
|
import example{
|
||||||
prefix ex;
|
prefix ex;
|
||||||
}
|
}
|
||||||
import clixon-lib{
|
import clixon-autocli{
|
||||||
prefix cl;
|
prefix autocli;
|
||||||
}
|
}
|
||||||
augment "/ex:table/ex:parameter/ex:value" {
|
augment "/ex:table/ex:parameter/ex:value" {
|
||||||
cl:autocli-op hide;
|
autocli:hide;
|
||||||
|
autocli:hide-show;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
@ -292,7 +285,6 @@ module example {
|
||||||
import example-augment{
|
import example-augment{
|
||||||
prefix aug;
|
prefix aug;
|
||||||
}
|
}
|
||||||
|
|
||||||
container table{
|
container table{
|
||||||
list parameter{
|
list parameter{
|
||||||
key name;
|
key name;
|
||||||
|
|
@ -310,11 +302,12 @@ cat <<EOF > $fyang2
|
||||||
module example-augment {
|
module example-augment {
|
||||||
namespace "urn:example:augment";
|
namespace "urn:example:augment";
|
||||||
prefix aug;
|
prefix aug;
|
||||||
import clixon-lib{
|
import clixon-autocli{
|
||||||
prefix cl;
|
prefix autocli;
|
||||||
}
|
}
|
||||||
grouping pg {
|
grouping pg {
|
||||||
cl:autocli-op hide; /* This is the extension */
|
autocli:hide;
|
||||||
|
autocli:hide-show;
|
||||||
leaf value{
|
leaf value{
|
||||||
description "a value";
|
description "a value";
|
||||||
type string;
|
type string;
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ function testrun()
|
||||||
expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $proto://$addr/restconf/data/ietf-yang-library:modules-state/module=ietf-interfaces,2018-02-20)" 0 "HTTP/$HVER 200" '{"ietf-yang-library:module":\[{"name":"ietf-interfaces","revision":"2018-02-20","namespace":"urn:ietf:params:xml:ns:yang:ietf-interfaces","conformance-type":"implement"}\]}'
|
expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $proto://$addr/restconf/data/ietf-yang-library:modules-state/module=ietf-interfaces,2018-02-20)" 0 "HTTP/$HVER 200" '{"ietf-yang-library:module":\[{"name":"ietf-interfaces","revision":"2018-02-20","namespace":"urn:ietf:params:xml:ns:yang:ietf-interfaces","conformance-type":"implement"}\]}'
|
||||||
|
|
||||||
new "restconf schema resource, mod-state top-level"
|
new "restconf schema resource, mod-state top-level"
|
||||||
expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $proto://$addr/restconf/data/ietf-yang-library:modules-state)" 0 "HTTP/$HVER 200" "{\"ietf-yang-library:modules-state\":{\"module-set-id\":\"0\",\"module\":\[{\"name\":\"clixon-example\",\"revision\":\"${CLIXON_EXAMPLE_REV}\",\"namespace\":\"urn:example:clixon\",\"conformance-type\":\"implement\"},{\"name\":\"clixon-lib\",\"revision\":\"${CLIXON_LIB_REV}\",\""
|
expectpart "$(curl $CURLOPTS -X GET -H 'Accept: application/yang-data+json' $proto://$addr/restconf/data/ietf-yang-library:modules-state)" 0 "HTTP/$HVER 200" "{\"ietf-yang-library:modules-state\":{\"module-set-id\":\"0\",\"module\":\[{\"name\":\"clixon-autocli\",\"revision\":\"${CLIXON_AUTOCLI_REV}\",\"namespace\":\"http://clicon.org/autocli\",\"conformance-type\":\"implement\"},{\"name\":\"clixon-example\",\"revision\":\"${CLIXON_EXAMPLE_REV}\",\"namespace\":\"urn:example:clixon\",\"conformance-type\":\"implement\"},{\"name\":\"clixon-lib\",\"revision\":\"${CLIXON_LIB_REV}\",\""
|
||||||
|
|
||||||
new "restconf options. RFC 8040 4.1"
|
new "restconf options. RFC 8040 4.1"
|
||||||
expectpart "$(curl $CURLOPTS -X OPTIONS $proto://$addr/restconf/data)" 0 "HTTP/$HVER 200" "Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE"
|
expectpart "$(curl $CURLOPTS -X OPTIONS $proto://$addr/restconf/data)" 0 "HTTP/$HVER 200" "Allow: OPTIONS,HEAD,GET,POST,PUT,PATCH,DELETE"
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ YANG_INSTALLDIR = @YANG_INSTALLDIR@
|
||||||
|
|
||||||
YANGSPECS = clixon-config@2021-07-11.yang # 5.3
|
YANGSPECS = clixon-config@2021-07-11.yang # 5.3
|
||||||
YANGSPECS = clixon-config@2021-12-05.yang # 5.5
|
YANGSPECS = clixon-config@2021-12-05.yang # 5.5
|
||||||
YANGSPECS += clixon-lib@2021-11-11.yang # 5.4
|
YANGSPECS += clixon-lib@2021-12-05.yang # 5.5
|
||||||
YANGSPECS += clixon-rfc5277@2008-07-01.yang
|
YANGSPECS += clixon-rfc5277@2008-07-01.yang
|
||||||
YANGSPECS += clixon-xml-changelog@2019-03-21.yang
|
YANGSPECS += clixon-xml-changelog@2019-03-21.yang
|
||||||
YANGSPECS += clixon-restconf@2021-05-20.yang # 5.2
|
YANGSPECS += clixon-restconf@2021-05-20.yang # 5.2
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,18 @@ module clixon-autocli{
|
||||||
description
|
description
|
||||||
"Initial version";
|
"Initial version";
|
||||||
}
|
}
|
||||||
|
extension hide {
|
||||||
|
description
|
||||||
|
"Modify the autocli by hiding the command associated with a YANG node and its
|
||||||
|
sub-commands.
|
||||||
|
The command is active but not shown by ? or TAB. In other words, it hides the
|
||||||
|
auto-completion of commands";
|
||||||
|
}
|
||||||
|
extension hide-show {
|
||||||
|
description
|
||||||
|
"Modify the autocli by hiding the command associated with a YANG node and its
|
||||||
|
sub-commands in CLI show commands.";
|
||||||
|
}
|
||||||
typedef autocli-op {
|
typedef autocli-op {
|
||||||
description
|
description
|
||||||
"Autocli rule-type operation, each rule use different fields as
|
"Autocli rule-type operation, each rule use different fields as
|
||||||
|
|
|
||||||
268
yang/clixon/clixon-lib@2021-12-05.yang
Normal file
268
yang/clixon/clixon-lib@2021-12-05.yang
Normal file
|
|
@ -0,0 +1,268 @@
|
||||||
|
module clixon-lib {
|
||||||
|
yang-version 1.1;
|
||||||
|
namespace "http://clicon.org/lib";
|
||||||
|
prefix cl;
|
||||||
|
|
||||||
|
import ietf-yang-types {
|
||||||
|
prefix yang;
|
||||||
|
}
|
||||||
|
organization
|
||||||
|
"Clicon / Clixon";
|
||||||
|
|
||||||
|
contact
|
||||||
|
"Olof Hagsand <olof@hagsand.se>";
|
||||||
|
|
||||||
|
description
|
||||||
|
"Clixon Netconf extensions for communication between clients and backend.
|
||||||
|
|
||||||
|
***** BEGIN LICENSE BLOCK *****
|
||||||
|
Copyright (C) 2009-2019 Olof Hagsand
|
||||||
|
Copyright (C) 2020-2021 Olof Hagsand and Rubicon Communications, LLC(Netgate)
|
||||||
|
|
||||||
|
This file is part of CLIXON
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the \"License\");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an \"AS IS\" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
Alternatively, the contents of this file may be used under the terms of
|
||||||
|
the GNU General Public License Version 3 or later (the \"GPL\"),
|
||||||
|
in which case the provisions of the GPL are applicable instead
|
||||||
|
of those above. If you wish to allow use of your version of this file only
|
||||||
|
under the terms of the GPL, and not to allow others to
|
||||||
|
use your version of this file under the terms of Apache License version 2,
|
||||||
|
indicate your decision by deleting the provisions above and replace them with
|
||||||
|
the notice and other provisions required by the GPL. If you do not delete
|
||||||
|
the provisions above, a recipient may use your version of this file under
|
||||||
|
the terms of any one of the Apache License version 2 or the GPL.
|
||||||
|
|
||||||
|
***** END LICENSE BLOCK *****";
|
||||||
|
|
||||||
|
revision 2021-12-05 {
|
||||||
|
description
|
||||||
|
"Obsoleted: extension autocli-op";
|
||||||
|
}
|
||||||
|
revision 2021-11-11 {
|
||||||
|
description
|
||||||
|
"Changed: RPC stats extended with YANG stats";
|
||||||
|
}
|
||||||
|
revision 2021-03-08 {
|
||||||
|
description
|
||||||
|
"Changed: RPC process-control output to choice dependent on operation";
|
||||||
|
}
|
||||||
|
revision 2020-12-30 {
|
||||||
|
description
|
||||||
|
"Changed: RPC process-control output parameter status to pid";
|
||||||
|
}
|
||||||
|
revision 2020-12-08 {
|
||||||
|
description
|
||||||
|
"Added: autocli-op extension.
|
||||||
|
rpc process-control for process/daemon management
|
||||||
|
Released in clixon 4.9";
|
||||||
|
}
|
||||||
|
revision 2020-04-23 {
|
||||||
|
description
|
||||||
|
"Added: stats RPC for clixon XML and memory statistics.
|
||||||
|
Added: restart-plugin RPC for restarting individual plugins without restarting backend.";
|
||||||
|
}
|
||||||
|
revision 2019-08-13 {
|
||||||
|
description
|
||||||
|
"No changes (reverted change)";
|
||||||
|
}
|
||||||
|
revision 2019-06-05 {
|
||||||
|
description
|
||||||
|
"ping rpc added for liveness";
|
||||||
|
}
|
||||||
|
revision 2019-01-02 {
|
||||||
|
description
|
||||||
|
"Released in Clixon 3.9";
|
||||||
|
}
|
||||||
|
typedef service-operation {
|
||||||
|
type enumeration {
|
||||||
|
enum start {
|
||||||
|
description
|
||||||
|
"Start if not already running";
|
||||||
|
}
|
||||||
|
enum stop {
|
||||||
|
description
|
||||||
|
"Stop if running";
|
||||||
|
}
|
||||||
|
enum restart {
|
||||||
|
description
|
||||||
|
"Stop if running, then start";
|
||||||
|
}
|
||||||
|
enum status {
|
||||||
|
description
|
||||||
|
"Check status";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
description
|
||||||
|
"Common operations that can be performed on a service";
|
||||||
|
}
|
||||||
|
extension autocli-op {
|
||||||
|
description
|
||||||
|
"Takes an argument an operation defing how to modify the clispec at
|
||||||
|
this point in the YANG tree for the automated generated CLI.
|
||||||
|
Note that this extension is only used in clixon_cli.
|
||||||
|
Operations is expected to be extended, but the following operations are defined:
|
||||||
|
- hide This command is active but not shown by ? or TAB (meaning, it hides the auto-completion of commands)
|
||||||
|
- hide-database This command hides the database
|
||||||
|
- hide-database-auto-completion This command hides the database and the auto completion (meaning, this command acts as both commands above)
|
||||||
|
Obsolete: use clixon-autocli:hide and clixon-autocli:hide-show instead";
|
||||||
|
argument cliop;
|
||||||
|
status obsolete;
|
||||||
|
}
|
||||||
|
rpc debug {
|
||||||
|
description "Set debug level of backend.";
|
||||||
|
input {
|
||||||
|
leaf level {
|
||||||
|
type uint32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rpc ping {
|
||||||
|
description "Check aliveness of backend daemon.";
|
||||||
|
}
|
||||||
|
rpc stats {
|
||||||
|
description "Clixon XML statistics.";
|
||||||
|
output {
|
||||||
|
container global{
|
||||||
|
description
|
||||||
|
"Clixon global statistics.
|
||||||
|
These are global counters incremented by new() and decreased by free() calls.
|
||||||
|
This number is higher than the sum of all datastore/module residing objects, since
|
||||||
|
objects may be used for other purposes than datastore/modules";
|
||||||
|
leaf xmlnr{
|
||||||
|
description
|
||||||
|
"Number of existing XML objects: number of residing xml/json objects
|
||||||
|
in the internal 'cxobj' representation.";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
leaf yangnr{
|
||||||
|
description
|
||||||
|
"Number of resident YANG objects. ";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
list datastore{
|
||||||
|
description "Per datastore statistics for cxobj";
|
||||||
|
key "name";
|
||||||
|
leaf name{
|
||||||
|
description "Name of datastore (eg running).";
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
leaf nr{
|
||||||
|
description "Number of XML objects. That is number of residing xml/json objects
|
||||||
|
in the internal 'cxobj' representation.";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
leaf size{
|
||||||
|
description "Size in bytes of internal datastore cache of datastore tree.";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
list module{
|
||||||
|
description "Per YANG module statistics";
|
||||||
|
key "name";
|
||||||
|
leaf name{
|
||||||
|
description "Name of YANG module.";
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
leaf nr{
|
||||||
|
description
|
||||||
|
"Number of YANG objects. That is number of residing YANG objects";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
leaf size{
|
||||||
|
description
|
||||||
|
"Size in bytes of internal YANG object representation.";
|
||||||
|
type uint64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rpc restart-plugin {
|
||||||
|
description "Restart specific backend plugins.";
|
||||||
|
input {
|
||||||
|
leaf-list plugin {
|
||||||
|
description "Name of plugin to restart";
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc process-control {
|
||||||
|
description
|
||||||
|
"Control a specific process or daemon: start/stop, etc.
|
||||||
|
This is for direct managing of a process by the backend.
|
||||||
|
Alternatively one can manage a daemon via systemd, containerd, kubernetes, etc.";
|
||||||
|
input {
|
||||||
|
leaf name {
|
||||||
|
description "Name of process";
|
||||||
|
type string;
|
||||||
|
mandatory true;
|
||||||
|
}
|
||||||
|
leaf operation {
|
||||||
|
type service-operation;
|
||||||
|
mandatory true;
|
||||||
|
description
|
||||||
|
"One of the strings 'start', 'stop', 'restart', or 'status'.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
output {
|
||||||
|
choice result {
|
||||||
|
case status {
|
||||||
|
description
|
||||||
|
"Output from status rpc";
|
||||||
|
leaf active {
|
||||||
|
description
|
||||||
|
"True if process is running, false if not.
|
||||||
|
More specifically, there is a process-id and it exists (in Linux: kill(pid,0).
|
||||||
|
Note that this is actual state and status is administrative state,
|
||||||
|
which means that changing the administrative state, eg stopped->running
|
||||||
|
may not immediately switch active to true.";
|
||||||
|
type boolean;
|
||||||
|
}
|
||||||
|
leaf description {
|
||||||
|
type string;
|
||||||
|
description "Description of process. This is a static string";
|
||||||
|
}
|
||||||
|
leaf command {
|
||||||
|
type string;
|
||||||
|
description "Start command with arguments";
|
||||||
|
}
|
||||||
|
leaf status {
|
||||||
|
description
|
||||||
|
"Administrative status (except on external kill where it enters stopped
|
||||||
|
directly from running):
|
||||||
|
stopped: pid=0, No process running
|
||||||
|
running: pid set, Process started and believed to be running
|
||||||
|
exiting: pid set, Process is killed by parent but not waited for";
|
||||||
|
type string;
|
||||||
|
}
|
||||||
|
leaf starttime {
|
||||||
|
description "Time of starting process UTC";
|
||||||
|
type yang:date-and-time;
|
||||||
|
}
|
||||||
|
leaf pid {
|
||||||
|
description "Process-id of main running process (if active)";
|
||||||
|
type uint32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case other {
|
||||||
|
description
|
||||||
|
"Output from start/stop/restart rpc";
|
||||||
|
leaf ok {
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue