Can get NW filter source XML definition
This commit is contained in:
@ -642,3 +642,21 @@ impl Handler<DeleteNetworkFilter> for LibVirtActor {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Message)]
|
||||
#[rtype(result = "anyhow::Result<String>")]
|
||||
pub struct GetSourceNetworkFilterXMLReq(pub XMLUuid);
|
||||
|
||||
impl Handler<GetSourceNetworkFilterXMLReq> for LibVirtActor {
|
||||
type Result = anyhow::Result<String>;
|
||||
|
||||
fn handle(
|
||||
&mut self,
|
||||
msg: GetSourceNetworkFilterXMLReq,
|
||||
_ctx: &mut Self::Context,
|
||||
) -> Self::Result {
|
||||
log::debug!("Get nw filter source XML:\n{}", msg.0.as_string());
|
||||
let nwfilter = NWFilter::lookup_by_uuid_string(&self.m, &msg.0.as_string())?;
|
||||
Ok(nwfilter.get_xml_desc(0)?)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user