mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
config: Reorganize command line parsing
The command line parsing of the user input was not properly abstracted from the vmm specific code. In the case of --net, the parsing was done when the device manager was adding devices. In order to fix this confusion, this patch introduces a new module "config" dedicated to the translation of a VmParams structure into a VmCfg structure. The former is built based on the input provided by the user, while the latter is the result of the parsing of every options. VmCfg is meant to be consumed by the vmm specific code, and it is also a fully public structure so that it can directly be built from a testing environment. Fixes #31 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
9900daacf8
commit
e5e651895b
+3
-1
@@ -11,9 +11,11 @@ use kvm_ioctls::*;
|
||||
use std::fmt::{self, Display};
|
||||
use std::result;
|
||||
|
||||
pub mod config;
|
||||
pub mod vm;
|
||||
|
||||
use self::vm::{Vm, VmConfig};
|
||||
use self::config::VmConfig;
|
||||
use self::vm::Vm;
|
||||
|
||||
/// Errors associated with VM management
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user