std::string uid_str;
bool fetch_stats;
+ bool sync_stats;
RESTArgs::get_string(s, "uid", uid_str, &uid_str);
RESTArgs::get_bool(s, "stats", false, &fetch_stats);
+ RESTArgs::get_bool(s, "sync", false, &sync_stats);
+
op_state.set_user_id(uid);
op_state.set_fetch_stats(fetch_stats);
+ op_state.set_sync_stats(sync_stats);
http_ret = RGWUserAdminOp_User::info(store, op_state, flusher);
}
if (ret < 0)
return ret;
+ if (op_state.sync_stats) {
+ ret = rgw_user_sync_all_stats(store, info.user_id);
+ if (ret < 0) {
+ return ret;
+ }
+ }
+
RGWStorageStats stats;
RGWStorageStats *arg_stats = NULL;
if (op_state.fetch_stats) {
__u8 system;
__u8 exclusive;
__u8 fetch_stats;
+ __u8 sync_stats;
std::string caps;
RGWObjVersionTracker objv;
uint32_t op_mask;
fetch_stats = is_fetch_stats;
}
+ void set_sync_stats(__u8 is_sync_stats) {
+ sync_stats = is_sync_stats;
+ }
+
void set_user_info(RGWUserInfo& user_info) {
user_id = user_info.user_id;
info = user_info;