aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-18 19:24:59 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-18 19:24:59 +0100
commit4eb16e886388f35d2bdee52b16922421004cf132 (patch)
tree9c15b75b6e647aad729042e0e91b3cbbde81f15f /src/garage/cli.rs
parent8e317e2783189723376074845e8b6c55ded79ecb (diff)
downloadgarage-4eb16e886388f35d2bdee52b16922421004cf132.tar.gz
garage-4eb16e886388f35d2bdee52b16922421004cf132.zip
Allow to import keys from previous Garage instancedev-0.2
Diffstat (limited to 'src/garage/cli.rs')
-rw-r--r--src/garage/cli.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/garage/cli.rs b/src/garage/cli.rs
index e74f59a2..21bafebd 100644
--- a/src/garage/cli.rs
+++ b/src/garage/cli.rs
@@ -194,6 +194,10 @@ pub enum KeyOperation {
/// Delete key
#[structopt(name = "delete")]
Delete(KeyDeleteOpt),
+
+ /// Import key
+ #[structopt(name = "import")]
+ Import(KeyImportOpt),
}
#[derive(Serialize, Deserialize, StructOpt, Debug)]
@@ -228,6 +232,19 @@ pub struct KeyDeleteOpt {
pub yes: bool,
}
+#[derive(Serialize, Deserialize, StructOpt, Debug)]
+pub struct KeyImportOpt {
+ /// Access key ID
+ pub key_id: String,
+
+ /// Secret access key
+ pub secret_key: String,
+
+ /// Key name
+ #[structopt(short = "n", default_value = "Imported key")]
+ pub name: String,
+}
+
#[derive(Serialize, Deserialize, StructOpt, Debug, Clone)]
pub struct RepairOpt {
/// Launch repair operation on all nodes