zig libvirt: added pool and volume enums/structs

This commit is contained in:
Jeeves 2024-06-25 06:23:28 -06:00
parent de395d47b1
commit 998872a284
2 changed files with 150 additions and 29 deletions

View file

@ -55,6 +55,18 @@ pub fn main() !void {
const name = domain.getName();
std.debug.print("name: {s}, active: {any}\n", .{ name, active });
}
var pool_iter = try connection.iteratePools(&[_]libvirt.Pool.ListFlags{
libvirt.Pool.ListFlags.Active,
libvirt.Pool.ListFlags.Inactive,
});
defer pool_iter.deinit();
while (pool_iter.next()) |pool| {
// const active = pool.isActive();
const name = try pool.getName();
std.debug.print("name: {s}\n", .{name});
}
}
pub const DomainSpec = struct {