From: Volker Theile Date: Fri, 2 Nov 2018 12:10:40 +0000 (+0100) Subject: rgw: Return tenant field in bucket_stats function X-Git-Tag: 3.2-0~23^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9440776f0625451a535d87749d65c8835a76e261;p=ceph-ci.git rgw: Return tenant field in bucket_stats function Fixes: https://tracker.ceph.com/issues/36681 Signed-off-by: Volker Theile --- diff --git a/qa/tasks/radosgw_admin_rest.py b/qa/tasks/radosgw_admin_rest.py index 8a4bf3c0fee..28e47e53b7d 100644 --- a/qa/tasks/radosgw_admin_rest.py +++ b/qa/tasks/radosgw_admin_rest.py @@ -382,6 +382,7 @@ def task(ctx, config): assert ret == 200 assert out['owner'] == user1 + assert out['tenant'] == '' bucket_id = out['id'] # TESTCASE 'bucket-stats4','bucket','stats','new empty bucket','succeeds, expected bucket ID' diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index fc44adeac66..006b1d62493 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -1420,6 +1420,7 @@ static int bucket_stats(RGWRados *store, const std::string& tenant_name, std::st formatter->open_object_section("stats"); formatter->dump_string("bucket", bucket.name); + formatter->dump_string("tenant", bucket.tenant); formatter->dump_string("zonegroup", bucket_info.zonegroup); formatter->dump_string("placement_rule", bucket_info.placement_rule); ::encode_json("explicit_placement", bucket.explicit_placement, formatter);