*/
class RGWUserBuckets
{
- map<string, RGWBucketEnt> buckets;
+ std::map<std::string, RGWBucketEnt> buckets;
public:
- RGWUserBuckets() {}
+ RGWUserBuckets() = default;
+ RGWUserBuckets(RGWUserBuckets&&) = default;
+
+ RGWUserBuckets& operator=(const RGWUserBuckets&) = default;
+
void encode(bufferlist& bl) const {
::encode(buckets, bl);
}
bool* is_truncated,
uint64_t default_amount = 1000);
-extern int rgw_link_bucket(RGWRados *store, const rgw_user& user_id, rgw_bucket& bucket, real_time creation_time, bool update_entrypoint = true);
+extern int rgw_link_bucket(RGWRados* store,
+ const rgw_user& user_id,
+ rgw_bucket& bucket,
+ ceph::real_time creation_time,
+ bool update_entrypoint = true);
extern int rgw_unlink_bucket(RGWRados *store, const rgw_user& user_id,
const string& tenant_name, const string& bucket_name, bool update_entrypoint = true);
rgw_bucket bucket;
+ RGWQuotaInfo quota;
+
void set_fetch_stats(bool value) { stat_buckets = value; }
void set_check_objects(bool value) { check_objects = value; }
void set_fix_index(bool value) { fix_index = value; }
void set_object(std::string& object_str) {
object_name = object_str;
}
+ void set_quota(RGWQuotaInfo& value) {
+ quota = value;
+ }
+
rgw_user& get_user_id() { return uid; }
std::string& get_user_display_name() { return display_name; }
int remove(RGWBucketAdminOpState& op_state, bool bypass_gc = false, bool keep_index_consistent = true, std::string *err_msg = NULL);
int link(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
int unlink(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
+ int set_quota(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
int remove_object(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
int policy_bl_to_stream(bufferlist& bl, ostream& o);
const std::list<std::string>& user_ids,
RGWFormatterFlusher& flusher,
bool warnings_only = false);
+ static int set_quota(RGWRados *store, RGWBucketAdminOpState& op_state);
};