Can view from web UI XML definition of domains
This commit is contained in:
@ -99,6 +99,20 @@ impl Handler<GetDomainXMLReq> for LibVirtActor {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Message)]
|
||||
#[rtype(result = "anyhow::Result<String>")]
|
||||
pub struct GetSourceDomainXMLReq(pub XMLUuid);
|
||||
|
||||
impl Handler<GetSourceDomainXMLReq> for LibVirtActor {
|
||||
type Result = anyhow::Result<String>;
|
||||
|
||||
fn handle(&mut self, msg: GetSourceDomainXMLReq, _ctx: &mut Self::Context) -> Self::Result {
|
||||
log::debug!("Get domain source XML:\n{}", msg.0.as_string());
|
||||
let domain = Domain::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
Ok(domain.get_xml_desc(VIR_DOMAIN_XML_SECURE)?)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Message)]
|
||||
#[rtype(result = "anyhow::Result<XMLUuid>")]
|
||||
pub struct DefineDomainReq(pub DomainXML);
|
||||
|
Reference in New Issue
Block a user