summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge/src/cli/connect/cli.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-01-10 08:49:09 +0100
committerMatthias Beyer <matthias.beyer@ifm.com>2022-02-18 15:41:57 +0100
commitdf052450ba30e55b5dcd464bca5236e1e995a2b9 (patch)
tree11ec5465c22459808055744582b6554d9f4bc624 /crates/core/tedge/src/cli/connect/cli.rs
parentee2a1c14f338fe5e433d4d58a862994d60fb18f7 (diff)
Replace structopt with clap 3
This patch rewrites the CLI interfaces to be used with clap 3.0 instead of clap 2.x + structopt. The changes are as minimal as possible, although I did not verify that the CLI is the same as before. Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge/src/cli/connect/cli.rs')
-rw-r--r--crates/core/tedge/src/cli/connect/cli.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/core/tedge/src/cli/connect/cli.rs b/crates/core/tedge/src/cli/connect/cli.rs
index 64a351f4..654af945 100644
--- a/crates/core/tedge/src/cli/connect/cli.rs
+++ b/crates/core/tedge/src/cli/connect/cli.rs
@@ -1,16 +1,15 @@
use crate::cli::connect::*;
use crate::command::{BuildCommand, BuildContext, Command};
use crate::system_services::service_manager;
-use structopt::StructOpt;
-#[derive(StructOpt, Debug, PartialEq)]
+#[derive(clap::Subcommand, Debug, PartialEq)]
pub enum TEdgeConnectOpt {
/// Create connection to Cumulocity
///
/// The command will create config and start edge relay from the device to c8y instance
C8y {
/// Test connection to Cumulocity
- #[structopt(long = "test")]
+ #[clap(long = "test")]
is_test_connection: bool,
},
@@ -19,7 +18,7 @@ pub enum TEdgeConnectOpt {
/// The command will create config and start edge relay from the device to az instance
Az {
/// Test connection to Azure
- #[structopt(long = "test")]
+ #[clap(long = "test")]
is_test_connection: bool,
},
}