minor things for clixon.4.4
This commit is contained in:
parent
916c1aabd7
commit
aa191152cb
3 changed files with 11 additions and 6 deletions
|
|
@ -117,11 +117,12 @@ enum cxobj_type {CX_ERROR=-1,
|
||||||
* XXX: lacks support for incoming restconf rpc, see api_operations_post_input)
|
* XXX: lacks support for incoming restconf rpc, see api_operations_post_input)
|
||||||
*/
|
*/
|
||||||
enum yang_bind{
|
enum yang_bind{
|
||||||
YB_MODULE=0, /* Search for matching yang binding among top-level symbols of Yang modules */
|
YB_NONE=0, /* Dont do Yang binding */
|
||||||
|
YB_MODULE, /* Search for matching yang binding among top-level symbols of Yang modules */
|
||||||
YB_PARENT, /* Assume yang binding of existing parent and match its children by name */
|
YB_PARENT, /* Assume yang binding of existing parent and match its children by name */
|
||||||
YB_NONE, /* Dont do Yang binding */
|
|
||||||
#ifdef NYI
|
#ifdef NYI
|
||||||
YB_RPC, /* Assume top-level xml is an netconf RPC message (NYI) */
|
YB_RPC, /* Assume top-level xml is an netconf RPC message */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
typedef enum yang_bind yang_bind;
|
typedef enum yang_bind yang_bind;
|
||||||
|
|
|
||||||
|
|
@ -1653,7 +1653,11 @@ assign_namespaces(cxobj *x0, /* source */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
y = xml_spec(x0);
|
if ((y = xml_spec(x0)) == NULL){
|
||||||
|
clicon_err(OE_YANG, ENOENT, "XML %s does not have yang spec",
|
||||||
|
xml_name(x0));
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
if ((prefix1 = strdup(yang_find_myprefix(y))) == NULL){
|
if ((prefix1 = strdup(yang_find_myprefix(y))) == NULL){
|
||||||
clicon_err(OE_UNIX, errno, "strdup");
|
clicon_err(OE_UNIX, errno, "strdup");
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
# - not a key int
|
# - not a key int
|
||||||
# - key in an ordered-by user
|
# - key in an ordered-by user
|
||||||
# - key in state data
|
# - key in state data
|
||||||
# Use instance-id for tests,since api-path can only handle keys, and xpath is too complex.
|
# Use instance-id for tests, since api-path can only handle keys, and xpath is too complex.
|
||||||
|
|
||||||
# Magic line must be first in script (see README.md)
|
# Magic line must be first in script (see README.md)
|
||||||
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
||||||
|
|
@ -82,7 +82,7 @@ for (( ii=0; ii<10; ii++ )); do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Then measure time for index and non-index, assume correct
|
# Then measure time for index and non-index, assume correct
|
||||||
# For small nr, the tiome to parse is so much larger than searching (and also parsing involves
|
# For small nr, the time to parse is so much larger than searching (and also parsing involves
|
||||||
# searching) which makes it hard to make a test comparing accessing the index variable "i" and the
|
# searching) which makes it hard to make a test comparing accessing the index variable "i" and the
|
||||||
# non-index variable "j".
|
# non-index variable "j".
|
||||||
new "index search latency i=$rndi"
|
new "index search latency i=$rndi"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue