Fixed: [Restconf PATCH method request failed on item defined by submodule #306](https://github.com/clicon/clixon/issues/306)

This commit is contained in:
Olof hagsand 2022-02-23 11:20:52 +01:00
parent 97316e0bfa
commit 2291275fae
5 changed files with 14 additions and 9 deletions

View file

@ -252,8 +252,12 @@ expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data?content=c
new "restconf edit augment 0"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:sub2 -d '{"main:aug0":"foo"}')" 0 "HTTP/$HVER 201"
new "restconf edit augment 1"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 201"
# Alternative use PUT
new "restconf PUT augment 1 "
expectpart "$(curl $CURLOPTS -X PUT -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main/aug1 -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 201"
new "restconf PATCH augment 1 "
expectpart "$(curl $CURLOPTS -X PATCH -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:main/aug1 -d '{"main:aug1":"foo"}')" 0 "HTTP/$HVER 204"
new "restconf edit augment 2"
expectpart "$(curl $CURLOPTS -X POST -H "Content-Type: application/yang-data+json" $RCPROTO://localhost/restconf/data/main:sub2 -d '{"main:aug2":"foo"}')" 0 "HTTP/$HVER 201"

View file

@ -141,7 +141,6 @@ case $release in
$sshcmd sudo pkg install -y fcgi-devkit nginx
;;
native)
$sshcmd sudo pkg install -y libevent
;;
esac
;;
@ -167,8 +166,8 @@ case $release in
$sshcmd sudo yum install -y nginx
;;
native)
$sshcmd sudo yum install -y libevent openssl
$sshcmd sudo yum install -y libevent-devel openssl-devel
$sshcmd sudo yum install -y openssl
$sshcmd sudo yum install -y openssl-devel
$sshcmd sudo yum-config-manager --enable powertools
$sshcmd sudo yum install -y libnghttp2-devel
;;
@ -245,7 +244,6 @@ case $release in
$sshcmd sudo pacman -Syu --noconfirm nginx fcgi
;;
native)
$sshcmd sudo pacman -Syu --noconfirm libevent
;;
esac
;;