Created first domain
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
use crate::actors::libvirt_actor;
|
||||
use crate::actors::libvirt_actor::{HypervisorInfo, LibVirtActor};
|
||||
use crate::actors::libvirt_actor::LibVirtActor;
|
||||
use crate::libvirt_lib_structures::{DomainXML, DomainXMLUuid};
|
||||
use crate::libvirt_rest_structures::HypervisorInfo;
|
||||
use actix::Addr;
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -10,4 +12,9 @@ impl LibVirtClient {
|
||||
pub async fn get_info(&self) -> anyhow::Result<HypervisorInfo> {
|
||||
self.0.send(libvirt_actor::GetHypervisorInfo).await?
|
||||
}
|
||||
|
||||
/// Update a domain
|
||||
pub async fn update_domain(&self, xml: DomainXML) -> anyhow::Result<DomainXMLUuid> {
|
||||
self.0.send(libvirt_actor::DefineDomainReq(xml)).await?
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user