Add backend SMBios support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -26,6 +26,7 @@ pub struct OSXML {
|
||||
pub firmware: String,
|
||||
pub r#type: OSTypeXML,
|
||||
pub loader: Option<OSLoaderXML>,
|
||||
pub smbios: Option<OSSMBiosXML>,
|
||||
}
|
||||
|
||||
/// OS Type information
|
||||
@ -48,6 +49,14 @@ pub struct OSLoaderXML {
|
||||
pub secure: String,
|
||||
}
|
||||
|
||||
/// SMBIOS System information
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename = "smbios")]
|
||||
pub struct OSSMBiosXML {
|
||||
#[serde(rename = "@mode")]
|
||||
pub mode: String,
|
||||
}
|
||||
|
||||
/// Hypervisor features
|
||||
#[derive(serde::Serialize, serde::Deserialize, Clone, Default, Debug)]
|
||||
#[serde(rename = "features")]
|
||||
@ -305,6 +314,29 @@ pub struct DomainCPUXML {
|
||||
pub topology: Option<DomainCPUTopology>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename = "entry")]
|
||||
pub struct OEMStringEntryXML {
|
||||
#[serde(rename = "$text")]
|
||||
pub content: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename = "oemStrings")]
|
||||
pub struct OEMStringsXML {
|
||||
#[serde(rename = "entry")]
|
||||
pub entries: Vec<OEMStringEntryXML>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename = "sysinfo")]
|
||||
pub struct SysInfoXML {
|
||||
#[serde(rename = "@type")]
|
||||
pub r#type: String,
|
||||
#[serde(rename = "oemStrings")]
|
||||
pub oem_strings: Option<OEMStringsXML>,
|
||||
}
|
||||
|
||||
/// Domain information, see https://libvirt.org/formatdomain.html
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename = "domain")]
|
||||
@ -335,6 +367,10 @@ pub struct DomainXML {
|
||||
/// CPU information
|
||||
pub cpu: DomainCPUXML,
|
||||
|
||||
/// SMBios strings
|
||||
pub sysinfo: Option<SysInfoXML>,
|
||||
|
||||
/// Behavior when guest state change
|
||||
pub on_poweroff: String,
|
||||
pub on_reboot: String,
|
||||
pub on_crash: String,
|
||||
|
Reference in New Issue
Block a user