use clap::{Parser, Subcommand};
use openstack_sdk::AsyncOpenStack;
use crate::{Cli, OpenStackCliError};
pub mod create_113;
pub mod create_128;
pub mod create_134;
pub mod create_138;
pub mod delete;
pub mod set_10;
pub mod set_112;
pub mod set_128;
pub mod set_138;
pub mod set_18;
pub mod show;
#[derive(Parser)]
pub struct AllocationCommand {
#[command(subcommand)]
command: AllocationCommands,
}
#[allow(missing_docs)]
#[derive(Subcommand)]
pub enum AllocationCommands {
#[command(visible_alias = "create")]
Create138(create_138::AllocationCommand),
Create134(create_134::AllocationCommand),
Create128(create_128::AllocationCommand),
Create113(create_113::AllocationCommand),
Delete(delete::AllocationCommand),
#[command(visible_alias = "set")]
Set138(set_138::AllocationCommand),
Set128(set_128::AllocationCommand),
Set112(set_112::AllocationCommand),
Set18(set_18::AllocationCommand),
Set10(set_10::AllocationCommand),
Show(show::AllocationCommand),
}
impl AllocationCommand {
pub async fn take_action(
&self,
parsed_args: &Cli,
session: &mut AsyncOpenStack,
) -> Result<(), OpenStackCliError> {
match &self.command {
AllocationCommands::Create138(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Create134(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Create128(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Create113(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Delete(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Set128(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Set138(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Set112(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Set18(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Set10(cmd) => cmd.take_action(parsed_args, session).await,
AllocationCommands::Show(cmd) => cmd.take_action(parsed_args, session).await,
}
}
}