op = CLS_RGW_OP_LINK_OLH_DM;
} else if (op_str == "unlink_instance") {
op = CLS_RGW_OP_UNLINK_INSTANCE;
+ } else if (op_str == "syncstop") {
+ op = CLS_RGW_OP_SYNCSTOP;
+ } else if (op_str == "resync") {
+ op = CLS_RGW_OP_RESYNC;
} else {
op = CLS_RGW_OP_UNKNOWN;
}
case CLS_RGW_OP_UNLINK_INSTANCE:
f->dump_string("op", "unlink_instance");
break;
+ case CLS_RGW_OP_SYNCSTOP:
+ f->dump_string("op", "syncstop");
+ break;
+ case CLS_RGW_OP_RESYNC:
+ f->dump_string("op", "resync");
+ break;
default:
f->dump_string("op", "invalid");
break;
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);