Skip to content

Commit

Permalink
CLI: rename 'clusters get' to 'clusters list', same for certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed May 22, 2023
1 parent 721a951 commit ec6c58e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions bin/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ pub enum StateCmd {
#[derive(Subcommand, PartialEq, Eq, Clone, Debug)]
pub enum ClusterCmd {
#[clap(
name = "get",
name = "list",
about = "Query clusters, all of them, or filtered by id or domain"
)]
Get {
List {
#[clap(short = 'i', long = "id", help = "cluster identifier")]
id: Option<String>,
#[clap(short = 'd', long = "domain", help = "cluster domain name")]
Expand Down Expand Up @@ -756,22 +756,22 @@ pub enum TcpListenerCmd {
#[derive(Subcommand, PartialEq, Eq, Clone, Debug)]
pub enum CertificateCmd {
#[clap(
name = "get",
name = "list",
about = "Query all certificates, or filtered by fingerprint or domain name.
This command queries the state of Sōzu by default, but can show results for all workers.
Use the --json option to get a much more verbose result, with certificate contents."
)]
Get {
List {
#[clap(
short = 'f',
long = "fingerprint",
help = "get the certificates for a given fingerprint"
help = "get the certificate for a given fingerprint"
)]
fingerprint: Option<String>,
#[clap(
short = 'd',
long = "domain",
help = "get certificates for a domain name"
help = "list certificates for a domain name"
)]
domain: Option<String>,
#[clap(
Expand Down
2 changes: 1 addition & 1 deletion bin/src/ctl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl CommandManager {
old_fingerprint.as_deref(),
tls_versions,
),
CertificateCmd::Get {
CertificateCmd::List {
fingerprint,
domain,
query_workers,
Expand Down
2 changes: 1 addition & 1 deletion bin/src/ctl/request_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl CommandManager {
ClusterCmd::Remove { id } => self.order_request(Request {
request_type: Some(RequestType::RemoveCluster(id)),
}),
ClusterCmd::Get { id, domain } => self.query_cluster(json, id, domain),
ClusterCmd::List { id, domain } => self.query_cluster(json, id, domain),
}
}

Expand Down

0 comments on commit ec6c58e

Please sign in to comment.