return 0;
}
+int RGWRados::set_bucket_tags(rgw_bucket& bucket, bufferlist tags_bl)
+{
+ RGWBucketInfo info;
+ map<string, bufferlist> attrs;
+ auto obj_ctx = svc.sysobj->init_obj_ctx();
+ int r;
+ if (bucket.bucket_id.empty()) {
+ r = get_bucket_info(obj_ctx, bucket.tenant, bucket.name, info, NULL, &attrs);
+ } else {
+ r = get_bucket_instance_info(obj_ctx, bucket, info, nullptr, &attrs);
+ }
+
+ attrs[RGW_ATTR_TAGS] = tags_bl;
+
+ r = put_bucket_instance_info(info, false, real_time(), &attrs);
+ if (r < 0) {
+ ldout(cct, 0) << "NOTICE: put_bucket_tags on bucket=" << bucket.name << " returned err=" << r << dendl;
+ return r;
+ }
+ return 0;
+}
+
int RGWRados::Object::complete_atomic_modification()
{
if (!state->has_manifest || state->keep_tail)
int set_buckets_enabled(std::vector<rgw_bucket>& buckets, bool enabled);
int bucket_suspended(rgw_bucket& bucket, bool *suspended);
+ int set_bucket_tags(rgw_bucket& bucket, bufferlist tags_bl);
+
/** Delete an object.*/
int delete_obj(RGWObjectCtx& obj_ctx,
const RGWBucketInfo& bucket_owner,