op_state.max_entries = max_entries;
op_state.marker = marker;
- op_ret = RGWUserAdminOp_User::list(store, op_state, flusher);
+ op_ret = RGWUserAdminOp_User::list(this, store, op_state, flusher);
}
class RGWOp_User_Info : public RGWRESTOp {
op_state.set_fetch_stats(fetch_stats);
op_state.set_sync_stats(sync_stats);
- op_ret = RGWUserAdminOp_User::info(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::info(s, store, op_state, flusher, y);
}
class RGWOp_User_Create : public RGWRESTOp {
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
if (!s->user->get_info().system && system) {
- ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
+ ldpp_dout(this, 0) << "cannot set system flag by non-system user" << dendl;
op_ret = -EINVAL;
return;
}
uint32_t op_mask;
int ret = rgw_parse_op_type_list(op_mask_str, &op_mask);
if (ret < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask: " << ret << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask: " << ret << dendl;
op_ret = -EINVAL;
return;
}
rgw_placement_rule target_rule;
target_rule.from_str(default_placement_str);
if (!store->svc()->zone->get_zone_params().valid_placement(target_rule)) {
- ldout(s->cct, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
+ ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;
return;
}
}
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::create(s, store, op_state, flusher, y);
}
class RGWOp_User_Modify : public RGWRESTOp {
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
if (!s->user->get_info().system && system) {
- ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
+ ldpp_dout(this, 0) << "cannot set system flag by non-system user" << dendl;
op_ret = -EINVAL;
return;
}
if (!op_mask_str.empty()) {
uint32_t op_mask;
if (rgw_parse_op_type_list(op_mask_str, &op_mask) < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask" << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask" << dendl;
op_ret = -EINVAL;
return;
}
uint32_t op_mask;
int ret = rgw_parse_op_type_list(op_mask_str, &op_mask);
if (ret < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask: " << ret << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask: " << ret << dendl;
op_ret = -EINVAL;
return;
}
rgw_placement_rule target_rule;
target_rule.from_str(default_placement_str);
if (!store->svc()->zone->get_zone_params().valid_placement(target_rule)) {
- ldout(s->cct, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
+ ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;
return;
}
}
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::modify(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::modify(s, store, op_state, flusher, y);
}
class RGWOp_User_Remove : public RGWRESTOp {
op_state.set_purge_data(purge_data);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::remove(store, op_state, flusher, s->yield);
+ op_ret = RGWUserAdminOp_User::remove(s, store, op_state, flusher, s->yield);
}
class RGWOp_Subuser_Create : public RGWRESTOp {
op_state.set_key_type(key_type);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::create(s, store, op_state, flusher, y);
}
class RGWOp_Subuser_Modify : public RGWRESTOp {
op_state.set_key_type(key_type);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::modify(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::modify(s, store, op_state, flusher, y);
}
class RGWOp_Subuser_Remove : public RGWRESTOp {
op_state.set_purge_keys();
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::remove(s, store, op_state, flusher, y);
}
class RGWOp_Key_Create : public RGWRESTOp {
op_state.set_key_type(key_type);
}
- op_ret = RGWUserAdminOp_Key::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Key::create(s, store, op_state, flusher, y);
}
class RGWOp_Key_Remove : public RGWRESTOp {
op_state.set_key_type(key_type);
}
- op_ret = RGWUserAdminOp_Key::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Key::remove(s, store, op_state, flusher, y);
}
class RGWOp_Caps_Add : public RGWRESTOp {
op_state.set_caps(caps);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Caps::add(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Caps::add(s, store, op_state, flusher, y);
}
class RGWOp_Caps_Remove : public RGWRESTOp {
op_state.set_caps(caps);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Caps::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Caps::remove(s, store, op_state, flusher, y);
}
struct UserQuotas {
op_state.set_user_id(uid);
RGWUser user;
- op_ret = user.init(store, op_state, y);
+ op_ret = user.init(s, store, op_state, y);
if (op_ret < 0)
return;
bool set_user = set_all || (quota_type == "user");
if (!(set_all || set_bucket || set_user)) {
- ldout(store->ctx(), 20) << "invalid quota type" << dendl;
+ ldpp_dout(this, 20) << "invalid quota type" << dendl;
op_ret = -EINVAL;
return;
}
}
if (use_http_params && set_all) {
- ldout(store->ctx(), 20) << "quota type was not specified, can't set all quotas via http headers" << dendl;
+ ldpp_dout(this, 20) << "quota type was not specified, can't set all quotas via http headers" << dendl;
op_ret = -EINVAL;
return;
}
op_state.set_user_id(uid);
RGWUser user;
- op_ret = user.init(store, op_state, y);
+ op_ret = user.init(s, store, op_state, y);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed initializing user info: " << op_ret << dendl;
+ ldpp_dout(this, 20) << "failed initializing user info: " << op_ret << dendl;
return;
}
UserQuotas quotas;
if ((op_ret = rgw_rest_get_json_input(store->ctx(), s, quotas, QUOTA_INPUT_MAX_LEN, NULL)) < 0) {
- ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+ ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
return;
}
bool empty;
op_ret = rgw_rest_get_json_input(store->ctx(), s, quota, QUOTA_INPUT_MAX_LEN, &empty);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+ ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
if (!empty)
return;
string err_msg;
op_ret = user.info(info, &err_msg);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed to get user info: " << op_ret << dendl;
+ ldpp_dout(this, 20) << "failed to get user info: " << op_ret << dendl;
return;
}
RGWQuotaInfo *old_quota;
}
string err;
- op_ret = user.modify(op_state, y, &err);
+ op_ret = user.modify(s, op_state, y, &err);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
+ ldpp_dout(this, 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
return;
}
}