diff options
author | samarah <suriarte@redhat.com> | 2022-11-11 18:56:46 +0100 |
---|---|---|
committer | Samarah <samarah.uriarte@ibm.com> | 2023-06-05 19:06:46 +0200 |
commit | 8d37f60c10fedbf6a5ecae52a8275c12d2b14e48 (patch) | |
tree | 60a9d8a6e9f8b3f3bedb4df5f3d1efda000aeb90 /src/rgw/rgw_sal_store.h | |
parent | rgw: Add cpp-redis submodule to ceph (diff) | |
download | ceph-8d37f60c10fedbf6a5ecae52a8275c12d2b14e48.tar.xz ceph-8d37f60c10fedbf6a5ecae52a8275c12d2b14e48.zip |
RGW: Add D4N classes and unit testing; update cpp_redis submodule
Signed-off-by: samarah <suriarte@redhat.com>
Diffstat (limited to 'src/rgw/rgw_sal_store.h')
-rw-r--r-- | src/rgw/rgw_sal_store.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rgw/rgw_sal_store.h b/src/rgw/rgw_sal_store.h index e4822a6cb6e..b9d9be4c6e5 100644 --- a/src/rgw/rgw_sal_store.h +++ b/src/rgw/rgw_sal_store.h @@ -58,12 +58,20 @@ class StoreUser : public User { virtual const rgw_user& get_id() const override { return info.user_id; } virtual uint32_t get_type() const override { return info.type; } virtual int32_t get_max_buckets() const override { return info.max_buckets; } + virtual void set_max_buckets(int32_t _max_buckets) override { + info.max_buckets = _max_buckets; + } virtual const RGWUserCaps& get_caps() const override { return info.caps; } virtual RGWObjVersionTracker& get_version_tracker() override { return objv_tracker; } virtual Attrs& get_attrs() override { return attrs; } virtual void set_attrs(Attrs& _attrs) override { attrs = _attrs; } virtual bool empty() const override { return info.user_id.id.empty(); } virtual RGWUserInfo& get_info() override { return info; } + virtual void set_info(RGWQuotaInfo& _quota) override { + info.quota.user_quota.max_size = _quota.max_size; + info.quota.user_quota.max_objects = _quota.max_objects; + } + virtual void print(std::ostream& out) const override { out << info.user_id; } friend class StoreBucket; @@ -113,6 +121,12 @@ class StoreBucket : public Bucket { virtual void set_owner(rgw::sal::User* _owner) override { owner = _owner; } + virtual void set_count(uint64_t _count) override { + ent.count = _count; + } + virtual void set_size(uint64_t _size) override { + ent.size = _size; + } virtual User* get_owner(void) override { return owner; }; virtual ACLOwner get_acl_owner(void) override { return ACLOwner(info.owner); }; virtual bool empty() const override { return info.bucket.name.empty(); } @@ -204,6 +218,9 @@ class StoreObject : public Object { virtual bool empty() const override { return state.obj.empty(); } virtual const std::string &get_name() const override { return state.obj.key.name; } + virtual void set_obj_state(RGWObjState& _state) override { + state = _state; + } virtual Attrs& get_attrs(void) override { return state.attrset; } virtual const Attrs& get_attrs(void) const override { return state.attrset; } virtual int set_attrs(Attrs a) override { state.attrset = a; state.has_attrs = true; return 0; } |