Skip to content

Commit

Permalink
Merge pull request #28209 from votdev/add_tenant_to_bucket
Browse files Browse the repository at this point in the history
mimic: rgw: Return tenant field in bucket_stats function

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
yuriw committed Jul 8, 2019
2 parents 39b5e12 + f13989f commit 85bad2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions qa/tasks/radosgw_admin_rest.py
Expand Up @@ -404,6 +404,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'
Expand Down
1 change: 1 addition & 0 deletions src/rgw/rgw_bucket.cc
Expand Up @@ -1432,6 +1432,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);
Expand Down

0 comments on commit 85bad2a

Please sign in to comment.