vmm: config: Provide a default empty command line through OpenAPI

The OpenAPI should not have to provide a command line since the CLI
considers the command line as an empty string if nothing is provided.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2019-12-13 12:10:13 +01:00
parent 43bd0e53c4
commit 93f5f6ed45

View File

@ -304,7 +304,7 @@ pub struct KernelConfig {
pub path: PathBuf,
}
#[derive(Clone, Deserialize, Serialize)]
#[derive(Clone, Default, Deserialize, Serialize)]
pub struct CmdlineConfig {
pub args: String,
}
@ -941,6 +941,7 @@ pub struct VmConfig {
#[serde(default)]
pub memory: MemoryConfig,
pub kernel: Option<KernelConfig>,
#[serde(default)]
pub cmdline: CmdlineConfig,
pub disks: Option<Vec<DiskConfig>>,
pub net: Option<Vec<NetConfig>>,