use anyhow::Error;
use clap::ArgMatches;
use crate::commands::config::set_hsm_shared;
use crate::http_client::MantaClient;
pub async fn exec(
cli_config_set_hsm: &ArgMatches,
client: &MantaClient,
token: &str,
) -> Result<(), Error> {
let new_hsm: &String = cli_config_set_hsm
.get_one("HSM_GROUP_NAME")
.ok_or_else(|| Error::msg("new hsm group not defined"))?;
set_hsm_shared::set_hsm_config_value(
client,
token,
new_hsm,
"hsm_group",
"Target HSM group",
)
.await
}