From: Orit Wasserman Date: Mon, 2 Jul 2018 13:03:12 +0000 (+0300) Subject: rgw: radogw-admin reshard status command should print text for reshard status X-Git-Tag: v14.0.1~925^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20779%2Fhead;p=ceph.git rgw: radogw-admin reshard status command should print text for reshard status Fixes: http://tracker.ceph.com/issues/23257 Signed-off-by: Orit Wasserman --- diff --git a/src/cls/rgw/cls_rgw_types.cc b/src/cls/rgw/cls_rgw_types.cc index 223d165547cd..9bec682bcce9 100644 --- a/src/cls/rgw/cls_rgw_types.cc +++ b/src/cls/rgw/cls_rgw_types.cc @@ -664,7 +664,21 @@ void cls_rgw_reshard_entry::generate_test_instances(list void cls_rgw_bucket_instance_entry::dump(Formatter *f) const { - encode_json("reshard_status", (int)reshard_status, f); + string status_str; + switch(reshard_status) { + case CLS_RGW_RESHARD_NONE: + status_str= "none"; + break; + case CLS_RGW_RESHARD_IN_PROGRESS: + status_str = "in-progress"; + break; + case CLS_RGW_RESHARD_DONE: + status_str = "done"; + break; + default: + status_str = "invalid"; + } + encode_json("reshard_status", status_str, f); encode_json("new_bucket_instance_id", new_bucket_instance_id, f); encode_json("num_shards", num_shards, f);