aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli/cmd.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-15 18:36:15 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:45:51 +0100
commit53f71b3a57b3c1828292e26b7865d31e9bec44d6 (patch)
treeb874fa38a3680b7ba153d34a711f4ebff6884c00 /src/garage/cli/cmd.rs
parent5b1117e582db16cc5aa50840a685875cbd5501f4 (diff)
downloadgarage-53f71b3a57b3c1828292e26b7865d31e9bec44d6.tar.gz
garage-53f71b3a57b3c1828292e26b7865d31e9bec44d6.zip
Implement bucket alias and bucket unalias
Diffstat (limited to 'src/garage/cli/cmd.rs')
-rw-r--r--src/garage/cli/cmd.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/garage/cli/cmd.rs b/src/garage/cli/cmd.rs
index 3cdf4d26..015eeec9 100644
--- a/src/garage/cli/cmd.rs
+++ b/src/garage/cli/cmd.rs
@@ -161,12 +161,15 @@ pub async fn cmd_admin(
}
AdminRpc::BucketList(bl) => {
println!("List of buckets:");
+ let mut table = vec![];
for alias in bl {
if let Some(p) = alias.state.get().as_option() {
let wflag = if p.website_access { "W" } else { " " };
- println!("- {} {} {:?}", wflag, alias.name, p.bucket_id);
+ table.push(format!("{}\t{}\t{:?}", wflag, alias.name, p.bucket_id));
}
}
+ format_table(table);
+ println!("Buckets that don't have a global alias (i.e. that only exist in the namespace of an access key) are not shown.");
}
AdminRpc::BucketInfo(bucket) => {
print_bucket_info(&bucket);