From ddb2b29bfd1da75a9035fecf15169891be5bcafd Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 28 May 2021 13:18:31 +0200 Subject: Rename datacenters into zones (doc not yet updated) --- src/garage/cli.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/garage') diff --git a/src/garage/cli.rs b/src/garage/cli.rs index 42cc657f..30d5726e 100644 --- a/src/garage/cli.rs +++ b/src/garage/cli.rs @@ -72,9 +72,9 @@ pub struct ConfigureNodeOpt { /// Node to configure (prefix of hexadecimal node id) node_id: String, - /// Location (datacenter) of the node - #[structopt(short = "d", long = "datacenter")] - datacenter: Option, + /// Location (zone or datacenter) of the node + #[structopt(short = "z", long = "zone")] + zone: Option, /// Capacity (in relative terms, use 1 to represent your smallest server) #[structopt(short = "c", long = "capacity")] @@ -347,7 +347,7 @@ pub async fn cmd_status( adv.state_info.hostname, adv.addr, cfg.tag, - cfg.datacenter, + cfg.zone, cfg.capacity_string() ); } else { @@ -374,7 +374,7 @@ pub async fn cmd_status( adv.state_info.hostname, adv.addr, cfg.tag, - cfg.datacenter, + cfg.zone, cfg.capacity_string(), (now_msec() - adv.last_seen) / 1000, ); @@ -386,7 +386,7 @@ pub async fn cmd_status( "{:?}\t{}\t{}\t{}\tnever seen", id, cfg.tag, - cfg.datacenter, + cfg.zone, cfg.capacity_string(), ); } @@ -467,9 +467,9 @@ pub async fn cmd_configure( "Please specify a capacity with the -c flag, or set node explicitly as gateway with -g".into())), }; NetworkConfigEntry { - datacenter: args - .datacenter - .expect("Please specifiy a datacenter with the -d flag"), + zone: args + .zone + .expect("Please specifiy a zone with the -z flag"), capacity, tag: args.tag.unwrap_or_default(), } @@ -481,9 +481,9 @@ pub async fn cmd_configure( _ => old.capacity, }; NetworkConfigEntry { - datacenter: args - .datacenter - .unwrap_or_else(|| old.datacenter.to_string()), + zone: args + .zone + .unwrap_or_else(|| old.zone.to_string()), capacity, tag: args.tag.unwrap_or_else(|| old.tag.to_string()), } -- cgit v1.2.3