Refactored yang schema code
YANG Deprecated: `CLICON_YANG_SCHEMA_MOUNT_SHARE` due to yang domain support
This commit is contained in:
parent
b1d969e42b
commit
6c73c36fb7
8 changed files with 87 additions and 41 deletions
|
|
@ -142,7 +142,6 @@ strip_body_objects(cxobj *xt)
|
|||
* @param[in] h Clixon handle
|
||||
* @param[in] xt XML tree node
|
||||
* @param[in] xsibling
|
||||
* @param[in] yspec Top-level YANG spec / mount-point
|
||||
* @param[out] xerr Reason for failure, or NULL
|
||||
* @retval 2 OK Yang assignment not made because yang parent is anyxml or anydata
|
||||
* @retval 1 OK Yang assignment made
|
||||
|
|
@ -155,7 +154,6 @@ static int
|
|||
populate_self_parent(clixon_handle h,
|
||||
cxobj *xt,
|
||||
cxobj *xsibling,
|
||||
yang_stmt *yspec,
|
||||
cxobj **xerr)
|
||||
{
|
||||
int retval = -1;
|
||||
|
|
@ -448,7 +446,7 @@ xml_bind_yang0_opt(clixon_handle h,
|
|||
goto done;
|
||||
break;
|
||||
case YB_PARENT:
|
||||
if ((ret = populate_self_parent(h, xt, xsibling, yspec, xerr)) < 0)
|
||||
if ((ret = populate_self_parent(h, xt, xsibling, xerr)) < 0)
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -474,7 +472,7 @@ xml_bind_yang0_opt(clixon_handle h,
|
|||
else if (h == NULL)
|
||||
goto ok; /* treat as anydata */
|
||||
else{
|
||||
if ((ret = yang_schema_yanglib_parse_mount(h, xt)) < 0) // XXX malloc + freed här
|
||||
if ((ret = yang_schema_yanglib_get_mount_parse(h, xt)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){ /* Special flag if mount-point but no yanglib */
|
||||
xml_flag_set(xt, XML_FLAG_ANYDATA);
|
||||
|
|
@ -557,7 +555,7 @@ xml_bind_yang0(clixon_handle h,
|
|||
goto done;
|
||||
break;
|
||||
case YB_PARENT:
|
||||
if ((ret = populate_self_parent(h, xt, NULL, yspec, xerr)) < 0)
|
||||
if ((ret = populate_self_parent(h, xt, NULL, xerr)) < 0)
|
||||
goto done;
|
||||
break;
|
||||
case YB_NONE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue