openstack_cli_compute/v2/server/
remote_console.rs1use clap::{Parser, Subcommand};
18
19use openstack_sdk::AsyncOpenStack;
20
21use openstack_cli_core::{cli::CliArgs, error::OpenStackCliError};
22
23mod create_26;
24mod create_28;
25
26#[derive(Parser)]
30pub struct RemoteConsoleCommand {
31 #[command(subcommand)]
32 command: RemoteConsoleCommands,
33}
34
35#[allow(missing_docs)]
37#[derive(Subcommand)]
38pub enum RemoteConsoleCommands {
39 Create26(create_26::RemoteConsoleCommand),
40 #[command(visible_alias = "create")]
41 Create28(create_28::RemoteConsoleCommand),
42}
43
44impl RemoteConsoleCommand {
45 pub async fn take_action<C: CliArgs>(
47 &self,
48 parsed_args: &C,
49 session: &mut AsyncOpenStack,
50 ) -> Result<(), OpenStackCliError> {
51 match &self.command {
52 RemoteConsoleCommands::Create26(cmd) => cmd.take_action(parsed_args, session).await,
53 RemoteConsoleCommands::Create28(cmd) => cmd.take_action(parsed_args, session).await,
54 }
55 }
56}