Feature #9359
rgw: Export user stats in get-user-info Adminops API
0%
Description
The user stats is useful information to view the space usage and total number of objects aggreagated at user level. It can be viewed with radosgw-admin user stats --uid=<uid> command. However, the current get-user-info Adminops API (http://ceph.com/docs/next/radosgw/adminops/#get-user-info) does not contain such information there. It can be added in a mimic way as get-user-info API (http://ceph.com/docs/next/radosgw/adminops/#get-bucket-info).
REQUEST PARAMETERS
- stats
- Description: Return bucket statistics.
- Type: Boolean
- Example: True [False]
- Required: No
RESPONSE ENTITIES
- stats
- Description: Per user stats as accounted by quota subsystem.
- Type: Container
Sample Reuquest
GET /{admin}/user?format=json&uid=foo_user&stats=true
Sample Response
{
"user_id":"foo_user",
"display_name":"foo_user",
"email":"","suspended":0,
"max_buckets":1000,
"subusers":[],
"keys":[],
"swift_keys":[],
"caps":[],
"stats": {
"total_entries": 2,
"total_bytes": 308,
"total_bytes_rounded": 8192,
}
}
Associated revisions
rgw: Export user stats in get-user-info Adminops API
Fixes: #9359
Signed-off-by: Ray Lv <raylv@yahoo-inc.com>
History
#1 Updated by Xiangyu Lv over 9 years ago
- Assignee set to Xiangyu Lv
#2 Updated by Xiangyu Lv over 9 years ago
Changed the sample response as to
Sample Response {
"user_id":"foo_user",
"display_name":"foo_user",
"email":"","suspended":0,
"max_buckets":1000,
"subusers":[],
"keys":[],
"swift_keys":[],
"caps":[],
"stats": {
"num_objects": 2,
"num_kb": 1,
"num_kb_rounded": 8,
}
}
#3 Updated by Xiangyu Lv over 9 years ago
- Status changed from New to Fix Under Review
Please help to review the pull request: https://github.com/ceph/ceph/pull/2446
#4 Updated by Xiangyu Lv over 9 years ago
Updated PR with a new commit to resolve Yehuda's comments. Please help to review it.
#5 Updated by Yehuda Sadeh over 9 years ago
- Status changed from Fix Under Review to Resolved