diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-11 18:41:15 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-11 18:41:15 +0100 |
commit | 2c2e65ad8b37128612ba47a777eacbae5e43f3ab (patch) | |
tree | a6e224afbb35e2baa88091731870ff575d118664 /src/garage/cli/structs.rs | |
parent | defd7d9e6353e10b0b9d58b66aad4f04e7d50c41 (diff) | |
parent | ec12d6c8ddde0f1dc908e43fef0ecc88d1e5406b (diff) | |
download | garage-2c2e65ad8b37128612ba47a777eacbae5e43f3ab.tar.gz garage-2c2e65ad8b37128612ba47a777eacbae5e43f3ab.zip |
Merge commit 'ec12d6c' into next
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index cb085813..49a1f267 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -87,6 +87,10 @@ pub enum LayoutOperation { #[structopt(name = "remove", version = garage_version())] Remove(RemoveRoleOpt), + /// Configure parameters value for the layout computation + #[structopt(name = "config", version = garage_version())] + Config(ConfigLayoutOpt), + /// Show roles currently assigned to nodes and changes staged for commit #[structopt(name = "show", version = garage_version())] Show, @@ -110,9 +114,9 @@ pub struct AssignRoleOpt { #[structopt(short = "z", long = "zone")] pub(crate) zone: Option<String>, - /// Capacity (in relative terms, use 1 to represent your smallest server) + /// Storage capacity, in bytes (supported suffixes: B, KB, MB, GB, TB, PB) #[structopt(short = "c", long = "capacity")] - pub(crate) capacity: Option<u32>, + pub(crate) capacity: Option<bytesize::ByteSize>, /// Gateway-only node #[structopt(short = "g", long = "gateway")] @@ -134,6 +138,13 @@ pub struct RemoveRoleOpt { } #[derive(StructOpt, Debug)] +pub struct ConfigLayoutOpt { + /// Zone redundancy parameter + #[structopt(short = "r", long = "redundancy")] + pub(crate) redundancy: Option<usize>, +} + +#[derive(StructOpt, Debug)] pub struct ApplyLayoutOpt { /// Version number of new configuration: this command will fail if /// it is not exactly 1 + the previous configuration's version |