summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_admin.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2023-10-03 21:51:13 +0200
committerCasey Bodley <cbodley@redhat.com>2023-11-06 17:09:04 +0100
commit015c4153bef0cbef4f66672e7c6cff6aeabf47cc (patch)
tree4e7d8f3c5cc1e9ee38b1f4cce9fb6f51b8cc8c4a /src/rgw/rgw_admin.cc
parentrgw: add rgw_bucket() ctor for tenant+name (diff)
downloadceph-015c4153bef0cbef4f66672e7c6cff6aeabf47cc.tar.xz
ceph-015c4153bef0cbef4f66672e7c6cff6aeabf47cc.zip
rgw: use load_bucket()'s rgw_bucket overload
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_admin.cc')
-rw-r--r--src/rgw/rgw_admin.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index 061464f0c2c..6ec1e0c6a38 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -1407,7 +1407,9 @@ int set_bucket_quota(rgw::sal::Driver* driver, OPT opt_cmd,
bool have_max_size, bool have_max_objects)
{
std::unique_ptr<rgw::sal::Bucket> bucket;
- int r = driver->load_bucket(dpp(), nullptr, tenant_name, bucket_name, &bucket, null_yield);
+ int r = driver->load_bucket(dpp(), nullptr,
+ rgw_bucket(tenant_name, bucket_name),
+ &bucket, null_yield);
if (r < 0) {
cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
return -r;
@@ -1431,7 +1433,9 @@ int set_bucket_ratelimit(rgw::sal::Driver* driver, OPT opt_cmd,
bool have_max_read_bytes, bool have_max_write_bytes)
{
std::unique_ptr<rgw::sal::Bucket> bucket;
- int r = driver->load_bucket(dpp(), nullptr, tenant_name, bucket_name, &bucket, null_yield);
+ int r = driver->load_bucket(dpp(), nullptr,
+ rgw_bucket(tenant_name, bucket_name),
+ &bucket, null_yield);
if (r < 0) {
cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
return -r;
@@ -1534,7 +1538,9 @@ int show_bucket_ratelimit(rgw::sal::Driver* driver, const string& tenant_name,
const string& bucket_name, Formatter *formatter)
{
std::unique_ptr<rgw::sal::Bucket> bucket;
- int r = driver->load_bucket(dpp(), nullptr, tenant_name, bucket_name, &bucket, null_yield);
+ int r = driver->load_bucket(dpp(), nullptr,
+ rgw_bucket(tenant_name, bucket_name),
+ &bucket, null_yield);
if (r < 0) {
cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
return -r;