* NACM extension (RFC8341)
* NACM module support (RFC8341 A1+A2)
* Recovery user "_nacm_recovery" added.
* Example use is restconf PUT when NACM edit-config is permitted, then automatic commit and discard are permitted using recovery user.
* Example user changed adm1 to andy to comply with RFC8341 example
* Yang code upgrade (RFC7950)
* RPC method input parameters validated
* see https://github.com/clicon/clixon/issues/4
* Correct XML namespace handling
* XML multiple modules was based on "loose" semantics so that yang modules were found by iterating thorugh namespaces until a match was made. This did not adhere to proper [XML namespace handling](https://www.w3.org/TR/2009/REC-xml-names-20091208), and causes problems with overlapping names and false positives. Below see XML accepted (but wrong), and correct namespace declaration:
```
<rpc><my-own-method></rpc> # Wrong but accepted
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> # Correct
<my-own-method xmlns="http://example.net/me/my-own/1.0">
</rpc>
```
* To keep old loose semantics set config option CLICON_XML_NS_ITERATE (true by default)
* XML to JSON translator support for mapping xmlns attribute to module name prefix.
* Default namespace is still "urn:ietf:params:xml:ns:netconf:base:1.0"
* See https://github.com/clicon/clixon/issues/49
* Changed all make tags --> make TAGS
* Keyvalue datastore removed (it has been disabled since 3.3.3)
* debug rpc added in example application (should be in clixon-config).
This commit is contained in:
parent
e5c0b06cf9
commit
ae1af8da9e
63 changed files with 1852 additions and 3492 deletions
35
test/lib.sh
35
test/lib.sh
|
|
@ -7,6 +7,12 @@
|
|||
testnr=0
|
||||
testname=
|
||||
|
||||
# If set to 0, override starting of clixon_backend in test (you bring your own)
|
||||
: ${BE:=1}
|
||||
|
||||
# If set, enable debugging (of backend)
|
||||
: ${DBG:=0}
|
||||
|
||||
# For memcheck
|
||||
#clixon_cli="valgrind --leak-check=full --show-leak-kinds=all clixon_cli"
|
||||
clixon_cli=clixon_cli
|
||||
|
|
@ -56,6 +62,7 @@ new(){
|
|||
testname=$1
|
||||
>&2 echo "Test$testnr [$1]"
|
||||
}
|
||||
# No CR
|
||||
new2(){
|
||||
testnr=`expr $testnr + 1`
|
||||
testname=$1
|
||||
|
|
@ -84,7 +91,7 @@ expectfn(){
|
|||
# echo "retval:\"$retval\""
|
||||
# echo "ret:\"$ret\""
|
||||
# echo "r:\"$r\""
|
||||
if [ $r != $retval ]; then
|
||||
if [ $r != $retval ]; then
|
||||
echo -e "\e[31m\nError ($r != $retval) in Test$testnr [$testname]:"
|
||||
echo -e "\e[0m:"
|
||||
exit -1
|
||||
|
|
@ -219,3 +226,29 @@ expectwait(){
|
|||
fi
|
||||
}
|
||||
|
||||
expectmatch(){
|
||||
ret=$1
|
||||
r=$2
|
||||
expret=$3
|
||||
expect=$4
|
||||
if [ $r != $expret ]; then
|
||||
echo -e "\e[31m\nError ($r != $retval) in Test$testnr [$testname]:"
|
||||
echo -e "\e[0m:"
|
||||
exit -1
|
||||
fi
|
||||
if [ -z "$ret" -a -z "$expect" ]; then
|
||||
echo > /dev/null
|
||||
else
|
||||
match=$(echo "$ret" | grep -Eo "$expect")
|
||||
if [ -z "$match" ]; then
|
||||
err "$expect" "$ret"
|
||||
fi
|
||||
if [ -n "$expect2" ]; then
|
||||
match=`echo "$ret" | grep -EZo "$expect2"`
|
||||
if [ -z "$match" ]; then
|
||||
err $expect "$ret"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue