Implements VM groups API (#206)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #206
This commit is contained in:
@ -122,6 +122,21 @@ impl LibVirtClient {
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
/// Get the full list of VMs of a given group
|
||||
pub async fn get_full_group_vm_list(
|
||||
&self,
|
||||
group: &VMGroupId,
|
||||
) -> anyhow::Result<Vec<DomainXML>> {
|
||||
let vms = self.get_full_domains_list().await?;
|
||||
let mut out = Vec::new();
|
||||
for vm in vms {
|
||||
if VMInfo::from_domain(vm.clone())?.group == Some(group.clone()) {
|
||||
out.push(vm);
|
||||
}
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
/// Update a network configuration
|
||||
pub async fn update_network(
|
||||
&self,
|
||||
|
Reference in New Issue
Block a user