]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add rgw_bucket() ctor for tenant+name
authorCasey Bodley <cbodley@redhat.com>
Tue, 3 Oct 2023 19:25:04 +0000 (15:25 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 6 Nov 2023 16:09:04 +0000 (11:09 -0500)
this avoids the need to construct a temporary rgw_bucket_key just to
construct a rgw_bucket without an instance id

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_bucket_types.h

index 52ac5dc34bd1fb3fbc21fc830893de3b048ceee6..ea379678ebe3f938c3a023fd4bffb4bebf71b3e5 100644 (file)
@@ -61,6 +61,9 @@ struct rgw_bucket {
             const std::string& _bucket_id) : tenant(_tenant),
                                               name(_name),
                                               bucket_id(_bucket_id) {}
+  rgw_bucket(const std::string& _tenant,
+            const std::string& _name)
+      : tenant(_tenant), name(_name) {}
   rgw_bucket(const rgw_bucket_key& bk) : tenant(bk.tenant),
                                          name(bk.name),
                                          bucket_id(bk.bucket_id) {}