mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Streamline and cleanup verbosity handling
Create one implementation for the verbose option to be used by all tools. While at it, add a quiet option to decrease the verbosity. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
@@ -3,18 +3,19 @@
|
||||
// Copyright IBM Corp. 2023
|
||||
|
||||
use clap::{ArgGroup, Args, CommandFactory, Parser, Subcommand, ValueEnum, ValueHint};
|
||||
use utils::{CertificateOptions, STDOUT};
|
||||
use utils::{CertificateOptions, DeprecatedVerbosityOptions, STDOUT};
|
||||
|
||||
/// Manage secrets for IBM Secure Execution guests.
|
||||
///
|
||||
/// Use to create and send add-secret requests, list the added secrets and lock the Secret Store.
|
||||
#[derive(Parser, Debug)]
|
||||
pub struct CliOptions {
|
||||
/// Provide more detailed output.
|
||||
#[arg(short='v', long, action = clap::ArgAction::Count, short_alias('V'))]
|
||||
pub verbose: u8,
|
||||
#[clap(flatten)]
|
||||
pub verbosity: DeprecatedVerbosityOptions,
|
||||
|
||||
/// Print version information and exit.
|
||||
// Implemented for the help message only. Actual parsing happens in the
|
||||
// version command.
|
||||
#[arg(long)]
|
||||
pub version: bool,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user