export async function domainGetAll({ connectionName } : { connectionName: ConnectionName }): Promise<void> {
try {
const [objPaths] = await call<[string[]]>(connectionName, '/org/libvirt/QEMU', 'org.libvirt.Connect', 'ListDomains', [0],
{ timeout, type: 'u' });
store.dispatch(deleteUnlistedVMs(connectionName, [], objPaths));
await Promise.all(objPaths.map(path => domainGet({ connectionName, id: path })));
pollUsageNow();
} catch (ex) {
console.warn('GET_ALL_VMS action failed:', String(ex));
throw ex;
}
}