From d1892aaf6b63f272f0ec4fb068d95bf45d9562f3 Mon Sep 17 00:00:00 2001 From: Brad Hubbard Date: Fri, 22 Feb 2019 12:16:38 +1000 Subject: [PATCH] qa/workunits/rest: Better detection of rest url Signed-off-by: Brad Hubbard --- qa/workunits/rest/test-restful.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/qa/workunits/rest/test-restful.sh b/qa/workunits/rest/test-restful.sh index 34fb189053731..fde0d107a0bd2 100755 --- a/qa/workunits/rest/test-restful.sh +++ b/qa/workunits/rest/test-restful.sh @@ -3,14 +3,8 @@ 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" +url=$(ceph mgr dump|jq -r .services.restful|sed -e 's/\/$//') +echo "url $url secret $secret" $mydir/test_mgr_rest_api.py $url $secret echo $0 OK -- 2.39.5