cli exclude clixon-restconf, extra cv check in default1
This commit is contained in:
parent
dcaeb581a1
commit
3ed41c5a04
2 changed files with 8 additions and 1 deletions
|
|
@ -1144,6 +1144,7 @@ xml_default1(yang_stmt *yt,
|
||||||
char *xpath;
|
char *xpath;
|
||||||
int nr = 0;
|
int nr = 0;
|
||||||
int hit = 0;
|
int hit = 0;
|
||||||
|
cg_var *cv;
|
||||||
|
|
||||||
if (xt == NULL){ /* No xml */
|
if (xt == NULL){ /* No xml */
|
||||||
clicon_err(OE_XML, EINVAL, "No XML argument");
|
clicon_err(OE_XML, EINVAL, "No XML argument");
|
||||||
|
|
@ -1163,7 +1164,12 @@ xml_default1(yang_stmt *yt,
|
||||||
continue;
|
continue;
|
||||||
switch (yang_keyword_get(yc)){
|
switch (yang_keyword_get(yc)){
|
||||||
case Y_LEAF:
|
case Y_LEAF:
|
||||||
if (!cv_flag(yang_cv_get(yc), V_UNSET)){ /* Default value exists */
|
if ((cv = yang_cv_get(yc)) == NULL){
|
||||||
|
clicon_err(OE_YANG,0, "Internal error: yang leaf %s not populated with cv as it should",
|
||||||
|
yang_argument_get(yc));
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (!cv_flag(cv, V_UNSET)){ /* Default value exists */
|
||||||
/* Check when condition */
|
/* Check when condition */
|
||||||
if (yang_check_when_xpath(NULL, xt, yc, &hit, &nr, &xpath) < 0)
|
if (yang_check_when_xpath(NULL, xt, yc, &hit, &nr, &xpath) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -654,6 +654,7 @@ module clixon-config {
|
||||||
<CLICON_CLI_AUTOCLI_EXCLUDE>clixon-restconf</CLICON_CLI_AUTOCLI_EXCLUDE>
|
<CLICON_CLI_AUTOCLI_EXCLUDE>clixon-restconf</CLICON_CLI_AUTOCLI_EXCLUDE>
|
||||||
means generate autocli for all models except clixon-restconf.yang
|
means generate autocli for all models except clixon-restconf.yang
|
||||||
The value can be a list of space separated module names";
|
The value can be a list of space separated module names";
|
||||||
|
default "clixon-restconf";
|
||||||
}
|
}
|
||||||
leaf CLICON_CLI_VARONLY {
|
leaf CLICON_CLI_VARONLY {
|
||||||
type int32;
|
type int32;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue