Add `purge` to `circuit` command
Adds the `circuit purge` subcommand to the CLI, behind the experimental
feature `circuit-purge`.
@@ -502,6 +502,34 @@ fn run<I: IntoIterator<Item = T>, T: Into<OsString> + Clone>(args: I) -> Result<
),
);
+ #[cfg(feature = "circuit-purge")]
+ let circuit_command = circuit_command.subcommand(
+ SubCommand::with_name("purge")
+ .about("Purge an existing disbanded circuit")
+ .arg(
+ Arg::with_name("url")
+ .short("U")
+ .long("url")
+ .takes_value(true)
+ .help("URL of Splinter Daemon"),
+ )
+ .arg(
+ Arg::with_name("private_key_file")
+ .value_name("private-key-file")
+ .short("k")
+ .long("key")
+ .takes_value(true)
+ .help("Path to private key file"),
+ )
+ .arg(
+ Arg::with_name("circuit_id")
+ .value_name("circuit-id")
+ .takes_value(true)
+ .required(true)
+ .help("ID of the circuit to be purged"),
+ ),
+ );
+
#[cfg(not(feature = "https-certs"))]
let cert_generate_subcommand = SubCommand::with_name("generate")
.long_about(
@@ -1155,6 +1183,9 @@ fn run<I: IntoIterator<Item = T>, T: Into<OsString> + Clone>(args: I) -> Result<
#[cfg(feature = "circuit-disband")]
let circuit_command = circuit_command.with_command("disband", circuit::CircuitDisbandAction);
+ #[cfg(feature = "circuit-purge")]
+ let circuit_command = circuit_command.with_command("purge", circuit::CircuitPurgeAction);
+
#[cfg(feature = "circuit-template")]
let circuit_command = circuit_command.with_command(
"template",
