Can update or delete domains
This commit is contained in:
@ -33,6 +33,13 @@ impl LibVirtClient {
|
||||
self.0.send(libvirt_actor::DefineDomainReq(xml)).await?
|
||||
}
|
||||
|
||||
/// Delete a domain
|
||||
pub async fn delete_domain(&self, id: DomainXMLUuid, keep_files: bool) -> anyhow::Result<()> {
|
||||
self.0
|
||||
.send(libvirt_actor::DeleteDomainReq { id, keep_files })
|
||||
.await?
|
||||
}
|
||||
|
||||
/// Get the state of a domain
|
||||
pub async fn get_domain_state(&self, id: DomainXMLUuid) -> anyhow::Result<DomainState> {
|
||||
self.0.send(libvirt_actor::GetDomainStateReq(id)).await?
|
||||
|
Reference in New Issue
Block a user