43 lines
1.0 KiB
Rust
43 lines
1.0 KiB
Rust
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Debug, Parser)]
|
|
#[command(name = "talos-slicer")]
|
|
#[command(author = "PlanetFirst <info@incubaid.com>")]
|
|
#[command(version = "0.1.0")]
|
|
#[command(about = "ZOS Talos Slicer - VM provisioning tool for Talos OS with Cloud Hypervisor", long_about = None)]
|
|
pub struct Cli {
|
|
#[command(subcommand)]
|
|
pub command: Commands,
|
|
}
|
|
|
|
#[derive(Debug, Subcommand)]
|
|
pub enum Commands {
|
|
/// Create a new Talos VM
|
|
Create {
|
|
/// Name of the VM
|
|
#[arg(short, long)]
|
|
name: String,
|
|
|
|
/// Number of vCPUs
|
|
#[arg(long, default_value_t = 1)]
|
|
cpus: u8,
|
|
|
|
/// Memory size in MB
|
|
#[arg(long, default_value_t = 512)]
|
|
memory: u32,
|
|
},
|
|
/// Delete a Talos VM
|
|
Delete {
|
|
/// Name of the VM to delete
|
|
#[arg(short, long)]
|
|
name: String,
|
|
},
|
|
/// List all Talos VMs
|
|
List,
|
|
/// Get information about a specific Talos VM
|
|
Info {
|
|
/// Name of the VM
|
|
#[arg(short, long)]
|
|
name: String,
|
|
},
|
|
} |