C-API: Extended yang_apply return value with: 2
Test: openconfig: ensure openconfig dirs searched before locally cached
This commit is contained in:
parent
c08dac2e5d
commit
9da4939ee0
3 changed files with 8 additions and 4 deletions
|
|
@ -201,7 +201,8 @@ typedef struct yang_stmt yang_stmt;
|
||||||
*
|
*
|
||||||
* @param[in] yn yang node
|
* @param[in] yn yang node
|
||||||
* @param[in] arg Argument
|
* @param[in] arg Argument
|
||||||
* @retval n OK, abort traversal and return to caller with "n"
|
* @retval 2 Locally abort this subtree, continue with others
|
||||||
|
* @retval 1 OK, abort traversal and return to caller with "n"
|
||||||
* @retval 0 OK, continue with next
|
* @retval 0 OK, continue with next
|
||||||
* @retval -1 Error, abort
|
* @retval -1 Error, abort
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -3403,7 +3403,8 @@ yang_features(clixon_handle h,
|
||||||
* @param[in] fn Callback
|
* @param[in] fn Callback
|
||||||
* @param[in] depth Depth argument: where to start. If <=0 call the calling node yn, if 1 start with its children, etc
|
* @param[in] depth Depth argument: where to start. If <=0 call the calling node yn, if 1 start with its children, etc
|
||||||
* @param[in] arg Argument
|
* @param[in] arg Argument
|
||||||
* @retval n OK, aborted at first encounter of first match
|
* @retval 2 OK, yn was skipped
|
||||||
|
* @retval 1 OK, aborted at first encounter of first match
|
||||||
* @retval 0 OK, all nodes traversed
|
* @retval 0 OK, all nodes traversed
|
||||||
* @retval -1 Error, aborted at first error encounter
|
* @retval -1 Error, aborted at first error encounter
|
||||||
* @code
|
* @code
|
||||||
|
|
@ -3441,7 +3442,9 @@ yang_apply(yang_stmt *yn,
|
||||||
ys = yn->ys_stmt[i];
|
ys = yn->ys_stmt[i];
|
||||||
if ((ret = yang_apply(ys, keyword, fn, depth-1, arg)) < 0)
|
if ((ret = yang_apply(ys, keyword, fn, depth-1, arg)) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
if (ret > 0){
|
if (ret == 2)
|
||||||
|
continue;
|
||||||
|
else if (ret > 0){
|
||||||
retval = ret;
|
retval = ret;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ cat <<EOF > $cfg
|
||||||
<clixon-config xmlns="http://clicon.org/config">
|
<clixon-config xmlns="http://clicon.org/config">
|
||||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||||
<CLICON_FEATURE>ietf-netconf:startup</CLICON_FEATURE>
|
<CLICON_FEATURE>ietf-netconf:startup</CLICON_FEATURE>
|
||||||
<CLICON_YANG_DIR>${YANG_INSTALLDIR}</CLICON_YANG_DIR>
|
|
||||||
<CLICON_YANG_DIR>${OPENCONFIG}</CLICON_YANG_DIR>
|
<CLICON_YANG_DIR>${OPENCONFIG}</CLICON_YANG_DIR>
|
||||||
|
<CLICON_YANG_DIR>${YANG_INSTALLDIR}</CLICON_YANG_DIR>
|
||||||
<CLICON_YANG_AUGMENT_ACCEPT_BROKEN>true</CLICON_YANG_AUGMENT_ACCEPT_BROKEN>
|
<CLICON_YANG_AUGMENT_ACCEPT_BROKEN>true</CLICON_YANG_AUGMENT_ACCEPT_BROKEN>
|
||||||
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
|
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
|
||||||
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
|
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue