aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-05-28 13:18:31 +0200
committerAlex Auvolat <alex@adnab.me>2021-05-28 14:07:36 +0200
commitddb2b29bfd1da75a9035fecf15169891be5bcafd (patch)
tree4bf7dd3107e4063ae278950c635f04e839905432 /src/garage
parentb490ebc7f6058719bd22c86fd0db95b09dc027d6 (diff)
downloadgarage-ddb2b29bfd1da75a9035fecf15169891be5bcafd.tar.gz
garage-ddb2b29bfd1da75a9035fecf15169891be5bcafd.zip
Rename datacenters into zones (doc not yet updated)
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/cli.rs24
1 files changed, 12 insertions, 12 deletions
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<String>,
+ /// Location (zone or datacenter) of the node
+ #[structopt(short = "z", long = "zone")]
+ zone: Option<String>,
/// 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()),
}