* New clixon-lib@2020-12-08.yang revision
* Added: autocli-op extension (see new features) * Added: rpc process-control for process/daemon management * Added enable flag and removed presence in clixon-restconf
This commit is contained in:
parent
d6db28c47a
commit
8540820698
11 changed files with 135 additions and 102 deletions
|
|
@ -40,7 +40,7 @@ for test in $pattern; do
|
|||
fi
|
||||
done
|
||||
if [ $err -eq 0 ]; then
|
||||
echo OK
|
||||
echo "OK, ${testnr} tests"
|
||||
else
|
||||
echo -e "\e[31mError"
|
||||
echo -ne "\e[0m"
|
||||
|
|
|
|||
|
|
@ -198,9 +198,9 @@ fi
|
|||
# Can be placed in clixon-config
|
||||
# Note that https clause assumes there exists certs and keys in /etc/ssl,...
|
||||
if [ $RCPROTO = http ]; then
|
||||
RESTCONFIG="<restconf><auth-type>password</auth-type><socket><namespace>default</namespace><address>0.0.0.0</address><port>80</port><ssl>false</ssl></socket></restconf>"
|
||||
RESTCONFIG="<restconf><enable>true</enable><auth-type>password</auth-type><socket><namespace>default</namespace><address>0.0.0.0</address><port>80</port><ssl>false</ssl></socket></restconf>"
|
||||
else
|
||||
RESTCONFIG="<restconf><auth-type>password</auth-type><server-cert-path>/etc/ssl/certs/clixon-server-crt.pem</server-cert-path><server-key-path>/etc/ssl/private/clixon-server-key.pem</server-key-path><server-ca-cert-path>/etc/ssl/certs/clixon-ca-crt.pem</server-ca-cert-path><socket><namespace>default</namespace><address>0.0.0.0</address><port>443</port><ssl>true</ssl></socket></restconf>"
|
||||
RESTCONFIG="<restconf><enable>true</enable><auth-type>password</auth-type><server-cert-path>/etc/ssl/certs/clixon-server-crt.pem</server-cert-path><server-key-path>/etc/ssl/private/clixon-server-key.pem</server-key-path><server-ca-cert-path>/etc/ssl/certs/clixon-ca-crt.pem</server-ca-cert-path><socket><namespace>default</namespace><address>0.0.0.0</address><port>443</port><ssl>true</ssl></socket></restconf>"
|
||||
fi
|
||||
|
||||
# Some tests may set owner of testdir to something strange and quit, need
|
||||
|
|
|
|||
|
|
@ -25,21 +25,21 @@ if [ $# -gt 0 ]; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
err=0
|
||||
let err=0 # error counter
|
||||
for testfile in $pattern; do # For lib.sh the variable must be called testfile
|
||||
echo "Running $testfile"
|
||||
./$testfile > /dev/null 2>&1
|
||||
errcode=$?
|
||||
if [ $errcode -ne 0 ]; then
|
||||
err=1
|
||||
let err++
|
||||
echo -e "\e[31mError in $testfile errcode=$errcode"
|
||||
echo -ne "\e[0m"
|
||||
fi
|
||||
done
|
||||
if [ $err -eq 0 ]; then
|
||||
echo OK
|
||||
echo "OK"
|
||||
else
|
||||
echo -e "\e[31mError"
|
||||
echo -e "\e[31m${err} Errors"
|
||||
echo -ne "\e[0m"
|
||||
exit -1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ if $IPv6; then
|
|||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||
RESTCONFIG=$(cat <<EOF
|
||||
<restconf xmlns="https://clicon.org/restconf">
|
||||
<enable>true</enable>
|
||||
<auth-type>password</auth-type>
|
||||
<server-cert-path>$srvcert</server-cert-path>
|
||||
<server-key-path>$srvkey</server-key-path>
|
||||
|
|
@ -79,6 +80,7 @@ else
|
|||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||
RESTCONFIG=$(cat <<EOF
|
||||
<restconf xmlns="https://clicon.org/restconf">
|
||||
<enable>true</enable>
|
||||
<auth-type>password</auth-type>
|
||||
<server-cert-path>$srvcert</server-cert-path>
|
||||
<server-key-path>$srvkey</server-key-path>
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ cat <<EOF > $cfg
|
|||
<CLICON_MODULE_LIBRARY_RFC7895>true</CLICON_MODULE_LIBRARY_RFC7895>
|
||||
<CLICON_NACM_MODE>internal</CLICON_NACM_MODE>
|
||||
<restconf>
|
||||
<enable>true</enable>
|
||||
<auth-type>client-certificate</auth-type>
|
||||
<server-cert-path>$srvcert</server-cert-path>
|
||||
<server-key-path>$srvkey</server-key-path>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue