]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: add 'GET /admin/realm?list' api to list realms 28751/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 16 May 2019 15:37:49 +0000 (11:37 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 25 Jun 2019 23:50:15 +0000 (19:50 -0400)
commit16b7fd83858315a0f536174fb652cac859945247
treee718dbf2b7123079d338695f1f7f4dee4df04c4a
parent50c2063d494f2d2e7cd298ac89e3fc72cce6d087
rgw: add 'GET /admin/realm?list' api to list realms

returns the same json format as 'radosgw-admin realm list', where
'default_info' is the id of the default realm, and 'realms' is the list
of realm names

the user must authenticate and have the 'zone' read capability

~/ceph/build $ curl http://localhost:8000/admin/realm?list
{"default_info":"52681550-8531-407c-b734-b588e5221883","realms":["bar","foo","dev"]}

~/ceph/build $ bin/radosgw-admin realm list
{
    "default_info": "52681550-8531-407c-b734-b588e5221883",
    "realms": [
        "bar",
        "foo",
        "dev"
    ]
}

Fixes: https://tracker.ceph.com/issues/39626
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 856d078cf478893d1081bda40707ac189c212739)
src/rgw/rgw_rest_realm.cc