pub enum CommandType {
Show 23 variants
Create {
append: bool,
name: String,
size: usize,
},
Delete {
name: String,
disk: Option<String>,
},
Rename {
old: String,
new: String,
},
ListDisks {
name: String,
},
NC {
name: String,
port: u16,
},
SSH {
name: String,
args: Option<Vec<String>>,
},
Supervise {
cdrom: Option<PathBuf>,
name: String,
},
Unsupervise {
name: String,
},
Run {
headless: bool,
detach: bool,
cdrom: Option<PathBuf>,
extra_disk: Option<PathBuf>,
name: String,
},
Shutdown {
nowait: bool,
name: String,
},
QMP {
name: String,
command: String,
arguments: Option<String>,
},
List {
running: bool,
},
Supervised,
Clone {
config: bool,
from: String,
to: String,
},
Import {
format: String,
name: String,
from_file: PathBuf,
},
Config(ConfigSubcommand),
Snapshot(SnapshotSubcommand),
IsActive {
name: String,
},
Save {
name: String,
},
Load {
name: String,
},
ClearState {
name: String,
},
Reset {
name: String,
},
Restart {
name: String,
},
}Variants§
Create
Create vm with a sized image, or append storage to an existing VM
Fields
Delete
Delete existing vm
Rename
Rename VM to new name
ListDisks
List all disks a VM has available
NC
Open standard input to a port on the VM
SSH
Uses ssh_port configuration variable to SSH into the host
Fields
Supervise
Configure supervision of an already existing VM
Fields
Unsupervise
Remove supervision of an already existing vm
Run
Just run a pre-created VM; no systemd involved
Fields
Shutdown
Gracefully shutdown a pre-created VM
QMP
Issue QMP commands to the guest
Fields
List
Yield a list of VMs, one on each line
Supervised
Yield a list of supervised VMs, one on each line
Clone
Clone one VM to another
Fields
Import
Import a VM from a VM image file
Fields
Config(ConfigSubcommand)
Show and manipulate VM configuration
Snapshot(SnapshotSubcommand)
Show and manipulate VM snapshots
IsActive
Is this VM currently active?
Save
Quickly save a snapshot of the named VM
Load
Load the quick save of the named VM
ClearState
Delete the quick save of the named VM
Reset
Hard Reset a VM
Restart
Shutdown and re-launch the VM. Does not work with supervisors.
Trait Implementations§
Source§impl Clone for CommandType
impl Clone for CommandType
Source§fn clone(&self) -> CommandType
fn clone(&self) -> CommandType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandType
impl Debug for CommandType
Source§impl FromArgMatches for CommandType
impl FromArgMatches for CommandType
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for CommandType
impl Subcommand for CommandType
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand