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

nautilus: radosgw-admin: add --uid check in bucket list command #30604

Merged
merged 1 commit into from
Oct 3, 2019
Merged
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
10 changes: 10 additions & 0 deletions src/rgw/rgw_admin.cc
Expand Up @@ -2897,6 +2897,10 @@ int main(int argc, const char **argv)
break;
} else if (ceph_argparse_witharg(args, i, &val, "-i", "--uid", (char*)NULL)) {
user_id.from_str(val);
if (user_id.empty()) {
cerr << "no value for uid" << std::endl;
exit(1);
}
} else if (ceph_argparse_witharg(args, i, &val, "--tenant", (char*)NULL)) {
tenant = val;
} else if (ceph_argparse_witharg(args, i, &val, "--access-key", (char*)NULL)) {
Expand Down Expand Up @@ -5462,6 +5466,12 @@ int main(int argc, const char **argv)

if (opt_cmd == OPT_BUCKETS_LIST) {
if (bucket_name.empty()) {
if (!user_id.empty()) {
if (!user_op.has_existing_user()) {
cerr << "ERROR: could not find user: " << user_id << std::endl;
return -ENOENT;
}
}
RGWBucketAdminOp::info(store, bucket_op, f);
} else {
RGWBucketInfo bucket_info;
Expand Down