The C API of libvirt is well documented and one can easily understand how the virNetworkGetDHCPLeases function should be called. However, it is less straightforward with the python libvirt module despite the libvirt development guide. The example from the sources shows the corresponding python method is DHCPLeases
import libvirt conn = libvirt.open("qemu:///system") net = conn.networkLookupByName("default") leases = net.DHCPLeases()
But how did virNetworkGetDHCPLeases become DHCPLeases?
Continue reading “libvirt functions discovery in python”