Can get XML network definition

This commit is contained in:
2023-12-11 18:41:59 +01:00
parent 2d5dc9237e
commit 375bdb1a46
11 changed files with 135 additions and 18 deletions

View File

@ -42,6 +42,12 @@ pub async fn get_single(client: LibVirtReq, req: web::Path<NetworkID>) -> HttpRe
Ok(HttpResponse::Ok().json(network))
}
/// Get the XML source description of a single network
pub async fn single_src(client: LibVirtReq, req: web::Path<NetworkID>) -> HttpResult {
let xml = client.get_single_network_xml(req.uid).await?;
Ok(HttpResponse::Ok().content_type("application/xml").body(xml))
}
/// Update the information about a single network
pub async fn update(
client: LibVirtReq,