Can start a domain

This commit is contained in:
2023-10-10 12:35:43 +02:00
parent 908b0f4c56
commit 0c7128e6eb
6 changed files with 38 additions and 1 deletions

View File

@ -37,4 +37,9 @@ impl LibVirtClient {
pub async fn get_domain_state(&self, id: DomainXMLUuid) -> anyhow::Result<DomainState> {
self.0.send(libvirt_actor::GetDomainStateReq(id)).await?
}
/// Start a domain
pub async fn start_domain(&self, id: DomainXMLUuid) -> anyhow::Result<()> {
self.0.send(libvirt_actor::StartDomainReq(id)).await?
}
}