[yang type range statement does not support multiple values](https://github.com/clicon/clixon/issues/59)

[Multiple ranges support](https://github.com/clicon/clixon/issues/78)
Restructured "cb" parameter in cli_generate.c
This commit is contained in:
Olof hagsand 2019-03-04 14:36:43 +01:00
parent fc93051b87
commit b182e8666f
6 changed files with 274 additions and 161 deletions

View file

@ -1262,6 +1262,10 @@ ys_populate_range(yang_stmt *ys,
/* This handles non-resolved also */
if (clicon_type2cv(origtype, restype, ys, &cvtype) < 0)
goto done;
if (!cv_isint(cvtype) && cvtype != CGV_DEC64){
clicon_err(OE_YANG, 0, "The range substatement only applies to int types, not to type: %s", origtype);
goto done;
}
if (range_parse(ys, cvtype, fraction_digits) < 0)
goto done;
retval = 0;
@ -1283,7 +1287,7 @@ ys_populate_range(yang_stmt *ys,
*/
static int
ys_populate_length(yang_stmt *ys,
void *arg)
void *arg)
{
int retval = -1;
yang_node *yparent; /* type */