From 8c81fa9ed22fab20f7d7a032683ecf0486c5fde3 Mon Sep 17 00:00:00 2001 From: shubham Date: Fri, 26 Feb 2021 20:22:59 +0530 Subject: [PATCH] feat: make bdev share protocol argument as an option Signed-off-by: shubham --- mayastor/src/bin/mayastor-client/bdev_cli.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mayastor/src/bin/mayastor-client/bdev_cli.rs b/mayastor/src/bin/mayastor-client/bdev_cli.rs index 328b1a848..3aa8b83c4 100644 --- a/mayastor/src/bin/mayastor-client/bdev_cli.rs +++ b/mayastor/src/bin/mayastor-client/bdev_cli.rs @@ -37,12 +37,10 @@ pub fn subcommands<'a, 'b>() -> App<'a, 'b> { let share = SubCommand::with_name("share") .about("share the given bdev") .arg(Arg::with_name("name").required(true).index(1)) - .arg( - Arg::with_name("protocol") - .help("the protocol to used to share the given bdev") - .required(false) - .default_value("nvmf") - .value_names(&["nvmf", "iscsi"]), + .arg(Arg::from_usage(" 'the protocol to used to share the given bdev'") + .short("p") + .possible_values(&["nvmf", "iscsi"]) + .default_value("nvmf"), ); let unshare = SubCommand::with_name("unshare")