use clap::{Parser, Subcommand};
use crate::{Cli, OpenStackCliError};
use openstack_sdk::AsyncOpenStack;
pub mod create_314;
pub mod delete;
pub mod list;
pub mod reset_status_319;
pub mod show;
#[derive(Parser)]
pub struct GroupSnapshotCommand {
#[command(subcommand)]
command: GroupSnapshotCommands,
}
#[allow(missing_docs)]
#[derive(Subcommand)]
pub enum GroupSnapshotCommands {
#[command(visible_alias = "create")]
Create314(Box<create_314::GroupSnapshotCommand>),
Delete(Box<delete::GroupSnapshotCommand>),
List(Box<list::GroupSnapshotsCommand>),
#[command(visible_alias = "reset-status")]
ResetStatus319(Box<reset_status_319::GroupSnapshotCommand>),
Show(Box<show::GroupSnapshotCommand>),
}
impl GroupSnapshotCommand {
pub async fn take_action(
&self,
parsed_args: &Cli,
session: &mut AsyncOpenStack,
) -> Result<(), OpenStackCliError> {
match &self.command {
GroupSnapshotCommands::Create314(cmd) => cmd.take_action(parsed_args, session).await,
GroupSnapshotCommands::Delete(cmd) => cmd.take_action(parsed_args, session).await,
GroupSnapshotCommands::List(cmd) => cmd.take_action(parsed_args, session).await,
GroupSnapshotCommands::ResetStatus319(cmd) => {
cmd.take_action(parsed_args, session).await
}
GroupSnapshotCommands::Show(cmd) => cmd.take_action(parsed_args, session).await,
}
}
}