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)