Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: add "radosgw-admin user list" cli #10000

Merged
merged 1 commit into from Jul 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/rgw/rgw_admin.cc
Expand Up @@ -57,6 +57,7 @@ void _usage()
cout << " user enable re-enable user after suspension\n";
cout << " user check check user info\n";
cout << " user stats show user stats as accounted by quota subsystem\n";
cout << " user list list users\n";
cout << " caps add add user capabilities\n";
cout << " caps rm remove user capabilities\n";
cout << " subuser create create a new subuser\n" ;
Expand Down Expand Up @@ -268,6 +269,7 @@ enum {
OPT_USER_ENABLE,
OPT_USER_CHECK,
OPT_USER_STATS,
OPT_USER_LIST,
OPT_SUBUSER_CREATE,
OPT_SUBUSER_MODIFY,
OPT_SUBUSER_RM,
Expand Down Expand Up @@ -452,6 +454,8 @@ static int get_cmd(const char *cmd, const char *prev_cmd, const char *prev_prev_
return OPT_USER_CHECK;
if (strcmp(cmd, "stats") == 0)
return OPT_USER_STATS;
if (strcmp(cmd, "list") == 0)
return OPT_USER_LIST;
} else if (strcmp(prev_cmd, "subuser") == 0) {
if (strcmp(cmd, "create") == 0)
return OPT_SUBUSER_CREATE;
Expand Down Expand Up @@ -4852,7 +4856,10 @@ int main(int argc, char **argv)
}
}

if (opt_cmd == OPT_METADATA_LIST) {
if (opt_cmd == OPT_METADATA_LIST || opt_cmd == OPT_USER_LIST) {
if (opt_cmd == OPT_USER_LIST) {
metadata_key = "user";
}
void *handle;
int max = 1000;
int ret = store->meta_mgr->list_keys_init(metadata_key, &handle);
Expand Down
1 change: 1 addition & 0 deletions src/test/cli/radosgw-admin/help.t
Expand Up @@ -9,6 +9,7 @@
user enable re-enable user after suspension
user check check user info
user stats show user stats as accounted by quota subsystem
user list list users
caps add add user capabilities
caps rm remove user capabilities
subuser create create a new subuser
Expand Down