]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #31185 from joke-lee/rgw-user-modify-placement
authorCasey Bodley <cbodley@users.noreply.github.com>
Mon, 27 Jan 2020 15:44:17 +0000 (10:44 -0500)
committerGitHub <noreply@github.com>
Mon, 27 Jan 2020 15:44:17 +0000 (10:44 -0500)
rgw: support specify user default placement and placement_tags when create or modify user

Reviewed-by: Casey Bodley <cbodley@redhat.com>
1  2 
src/rgw/rgw_admin.cc
src/rgw/rgw_rest_user.cc
src/rgw/rgw_user.cc

Simple merge
index 89a339468b9f8e19df60cea132e68cd4538d045a,b8414812fedc073a9dd64fdf6bb69280d6fbcc5c..8e6984a7a165c4d81982f4fa36bc2da7a9282539
@@@ -142,8 -145,10 +145,10 @@@ void RGWOp_User_Create::execute(
    RESTArgs::get_bool(s, "system", false, &system);
    RESTArgs::get_bool(s, "exclusive", false, &exclusive);
    RESTArgs::get_string(s, "op-mask", op_mask_str, &op_mask_str);
+   RESTArgs::get_string(s, "default-placement", default_placement_str, &default_placement_str);
+   RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
  
 -  if (!s->user->system && system) {
 +  if (!s->user->get_info().system && system) {
      ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
      http_ret = -EINVAL;
      return;
@@@ -260,8 -281,10 +284,10 @@@ void RGWOp_User_Modify::execute(
  
    RESTArgs::get_bool(s, "system", false, &system);
    RESTArgs::get_string(s, "op-mask", op_mask_str, &op_mask_str);
+   RESTArgs::get_string(s, "default-placement", default_placement_str, &default_placement_str);
+   RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
  
 -  if (!s->user->system && system) {
 +  if (!s->user->get_info().system && system) {
      ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
      http_ret = -EINVAL;
      return;
Simple merge