diff options
Diffstat (limited to 'src/ceph/qa/workunits/rest/test-restful.sh')
-rwxr-xr-x | src/ceph/qa/workunits/rest/test-restful.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ceph/qa/workunits/rest/test-restful.sh b/src/ceph/qa/workunits/rest/test-restful.sh new file mode 100755 index 0000000..34fb189 --- /dev/null +++ b/src/ceph/qa/workunits/rest/test-restful.sh @@ -0,0 +1,16 @@ +#!/bin/sh -ex + +mydir=`dirname $0` + +secret=`ceph config-key get mgr/restful/keys/admin` +active=`ceph mgr dump | jq -r .active_name` +echo "active $active admin secret $secret" + +prefix="mgr/restful/$active" +addr=`ceph config-key get $prefix/server_addr || echo 127.0.0.1` +port=`ceph config-key get $prefix/server_port || echo 8003` +url="https://$addr:$port" +echo "prefix $prefix url $url" +$mydir/test_mgr_rest_api.py $url $secret + +echo $0 OK |