[libvirt] API calls to get interfaces and block devices
Ruben Kerkhof
ruben at rubenkerkhof.com
Fri Apr 11 11:14:50 UTC 2014
Hi all,
I have a few python scripts which use the libvirt api to get interface and block device statistics.
What has been bugging me for a while now that is that there’s no high level api to get a list of all interfaces or block devices for a vm.
The list can be retrieved from the xml with a bit of Xpath magic, but this seems to me to break the nice abstraction layer libvirt provides.
Ideally, I don’t have to do anything with xml, and add dependencies on xml parsers to my code.
I’ve seen examples of code doing this, for example the collectd libvirt plugin, but there must be many others.
Can I kindly ask for such an API? Unfortunately I don’t have the skills to code this up myself.
Kind regards,
Ruben Kerkhof
More information about the libvir-list
mailing list