summaryrefslogtreecommitdiffstats
path: root/qa/workunits/rest/test-restful.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /qa/workunits/rest/test-restful.sh
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/workunits/rest/test-restful.sh')
-rwxr-xr-xqa/workunits/rest/test-restful.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/qa/workunits/rest/test-restful.sh b/qa/workunits/rest/test-restful.sh
new file mode 100755
index 00000000..34fb1890
--- /dev/null
+++ b/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