Add SSH_BIN compile-time option

Clarify documentation of internal netconf message struct
This commit is contained in:
Olof hagsand 2022-12-07 11:28:45 +01:00
parent 407860ccc7
commit 100f15b699
9 changed files with 67 additions and 9 deletions

View file

@ -96,3 +96,5 @@ YANG_STANDARD_DIR=@YANG_STANDARD_DIR@
YANG_INSTALLDIR=@YANG_INSTALLDIR@
MIB_GENERATED_YANG_DIR=@MIB_GENERATED_YANG_DIR@
SSH_BIN=@SSH_BIN@

View file

@ -4,8 +4,10 @@
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
# Skip it if no openssh
if ! [ -x "$(command -v ssh)" ]; then
ssh_bin=${SSH_BIN}
# Skip it if no ssh bin
if ! [ -x "$ssh_bin" ]; then
echo "...ssh not installed"
rm -rf $dir
if [ "$s" = $0 ]; then exit 0; else return 0; fi # skip
@ -142,9 +144,9 @@ HashKnownHosts no
EOF
new "Start Listener client"
echo "ssh -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand=\"clixon_netconf_ssh_callhome_client -a 127.0.0.1\" . netconf"
echo "${ssh_bin} -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand=\"clixon_netconf_ssh_callhome_client -a 127.0.0.1\" . netconf"
#-F $sshcfg
expectpart "$(ssh -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand="${clixon_netconf_ssh_callhome_client} -a 127.0.0.1" . netconf < $rpccmd)" 0 "<hello $DEFAULTONLY><capabilities><capability>urn:ietf:params:netconf:base:1.1</capability>.*</capabilities><session-id>2</session-id></hello>" "<rpc-reply $DEFAULTNS><data/></rpc-reply>"
expectpart "$(${ssh_bin} -s -F $sshcfg -v -i $key -o ProxyUseFdpass=yes -o ProxyCommand="${clixon_netconf_ssh_callhome_client} -a 127.0.0.1" . netconf < $rpccmd)" 0 "<hello $DEFAULTONLY><capabilities><capability>urn:ietf:params:netconf:base:1.1</capability>.*</capabilities><session-id>2</session-id></hello>" "<rpc-reply $DEFAULTNS><data/></rpc-reply>"
# Wait
wait

View file

@ -8,7 +8,7 @@
# o explicit
# Clixon supports explicit, but the testcases define the other cases as well
# in case others will be supported
# XXX I dont think this is correct. Or at least it is not complete.
# See test_yang_with_default for full RFC6243 tests
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi