summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-03-06 10:25:52 -0800
committerYehuda Sadeh <yehuda@inktank.com>2013-03-22 11:28:02 -0700
commite5256a2f051b53cceb91b379d85b7d11e4eb2807 (patch)
treeadfb4c802c28baf2c2b8e93bd6e8fa258fb11d79
parenta6120a60ecd5d0b4ffdee1aa4099264cca5aee17 (diff)
downloadceph-e5256a2f051b53cceb91b379d85b7d11e4eb2807.tar.gz
rgw: metadata list user, only show uids
don't show unrelated object names Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_user.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc
index d2c972ea6e2..f9d5de50a29 100644
--- a/src/rgw/rgw_user.cc
+++ b/src/rgw/rgw_user.cc
@@ -553,8 +553,24 @@ public:
RGWRados *store = info->store;
- return store->list_raw_objects(store->zone.user_uid_pool, no_filter,
- max, info->ctx, keys, truncated);
+ list<string> unfiltered_keys;
+
+ int ret = store->list_raw_objects(store->zone.user_uid_pool, no_filter,
+ max, info->ctx, unfiltered_keys, truncated);
+ if (ret < 0)
+ return ret;
+
+ // now filter out the buckets entries
+ list<string>::iterator iter;
+ for (iter = unfiltered_keys.begin(); iter != unfiltered_keys.end(); ++iter) {
+ string& k = *iter;
+
+ if (k.find(".buckets") == string::npos) {
+ keys.push_back(k);
+ }
+ }
+
+ return 0;
}
void list_keys_complete(void *handle) {