Building problems with evhtp
This commit is contained in:
parent
c7e7598e3b
commit
e9df7b81f2
10 changed files with 134 additions and 109 deletions
|
|
@ -105,10 +105,9 @@ EOF
|
|||
|
||||
new "wait backend"
|
||||
wait_backend
|
||||
else
|
||||
new "Restart backend as eg follows: -Ff $cfg -s $db"
|
||||
sleep 2
|
||||
fi
|
||||
new "wait backend"
|
||||
wait_backend
|
||||
|
||||
if [ $RC -ne 0 ]; then # Bring your own restconf
|
||||
new "kill old restconf daemon"
|
||||
|
|
@ -116,10 +115,9 @@ EOF
|
|||
|
||||
new "start restconf daemon"
|
||||
start_restconf -f $cfg
|
||||
|
||||
new "wait restconf"
|
||||
wait_restconf
|
||||
fi
|
||||
new "wait restconf"
|
||||
wait_restconf
|
||||
|
||||
# Use POST (instead of startup)
|
||||
# Note this only works because CLICON_NACM_DISABLED_ON_EMPTY is true
|
||||
|
|
@ -177,9 +175,12 @@ EOF
|
|||
status="HTTP/1.1 200 OK"
|
||||
;;
|
||||
esac
|
||||
|
||||
new "get 99"
|
||||
expectpart "$(curl -u guest:bar $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/nacm-example:x)" 0 "$status" "$ret"
|
||||
|
||||
sleep $DEMSLEEP
|
||||
|
||||
if [ $RC -ne 0 ]; then # Bring your own restconf
|
||||
new "Kill restconf daemon"
|
||||
stop_restconf
|
||||
|
|
|
|||
|
|
@ -184,10 +184,10 @@ nacm
|
|||
# delete | p/d | xp/dx | p/d
|
||||
|
||||
# replace all, then must include NACM rules as well
|
||||
# This usually triggers a 'HTTP/1.1 100 Continue' from curl as well
|
||||
MSG="<data>$RULES</data>"
|
||||
new "update root list permit"
|
||||
expectpart "$(curl -u andy:bar $CURLOPTS -H 'Content-Type: application/yang-data+xml' -X PUT $RCPROTO://localhost/restconf/data -d "$MSG")" 0 'HTTP/1.1 204 No Content'
|
||||
# Usually a 'HTTP/1.1 100 Continue' as well
|
||||
|
||||
new "delete root list deny"
|
||||
expectpart "$(curl -u wilma:bar $CURLOPTS -X DELETE $RCPROTO://localhost/restconf/data)" 0 'HTTP/1.1 403 Forbidden' '{"ietf-restconf:errors":{"error":{"error-type":"application","error-tag":"access-denied","error-severity":"error","error-message":"default deny"}}}
'
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ system=$($sshcmd uname) # we use the release "hack" instead
|
|||
|
||||
# Some release have packages, some need to be built from source
|
||||
buildfcgi=false
|
||||
buildevhtp=false
|
||||
case $release in
|
||||
openbsd)
|
||||
# packages for building
|
||||
|
|
@ -130,7 +129,7 @@ case $release in
|
|||
$sshcmd sudo pkg install -y fcgi-devkit nginx
|
||||
;;
|
||||
evhtp)
|
||||
$sshcmd sudo pkg install -y libevent libevhtp
|
||||
$sshcmd sudo pkg install -y libevent
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
@ -157,7 +156,6 @@ case $release in
|
|||
;;
|
||||
evhtp)
|
||||
$sshcmd sudo yum install -y libevent openssl
|
||||
buildevhtp=true
|
||||
$sshcmd sudo yum install -y libevent-devel openssl-devel
|
||||
;;
|
||||
esac
|
||||
|
|
@ -203,7 +201,6 @@ case $release in
|
|||
;;
|
||||
evhtp)
|
||||
# $sshcmd sudo apt install -y libevent-2.1
|
||||
buildevhtp=true
|
||||
$sshcmd sudo apt install -y libevent-dev libssl-dev
|
||||
;;
|
||||
esac
|
||||
|
|
@ -257,15 +254,13 @@ case ${with_restconf} in
|
|||
. ./nginx.sh $dir $idfile $port $wwwuser
|
||||
;;
|
||||
evhtp)
|
||||
if $buildevhtp; then
|
||||
$sshcmd << 'EOF'
|
||||
test -d libevhtp || git clone https://github.com/clicon/libevhtp.git
|
||||
cd libevhtp;
|
||||
./configure --libdir=/usr/lib # otherwise in /usr/local/lib where RH dont look
|
||||
make
|
||||
sudo make install
|
||||
$sshcmd << 'EOF'
|
||||
test -d clixon-libevhtp || git clone https://github.com/clicon/clixon-libevhtp.git
|
||||
cd clixon-libevhtp;
|
||||
./configure --libdir=/usr/lib # otherwise in /usr/local/lib where RH dont look
|
||||
make
|
||||
sudo make install
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue