[libvirt-users] List volumes of a domain

Hi all, I'm using libvirt java binding (libvirt-java-0.4.6) I'd like to know if the Domain class offers an API to query volumes attached to a particular domain or should I parse the XML domain description? Thanks for your support -- Andrea Turli Ricercatore Direzione Ricerca e Innovazione andrea.turli@eng.it Engineering Ingegneria Informatica spa Via Riccardo Morandi, 32 00148 Roma (RM) Tel. +39 06 8307 4710 Fax +39 06 8307 4200 www.eng.it

On Tue, Oct 26, 2010 at 04:05:23PM +0200, Andrea Turli wrote:
Hi all,
I'm using libvirt java binding (libvirt-java-0.4.6) I'd like to know if the Domain class offers an API to query volumes attached to a particular domain or should I parse the XML domain description?
There is no such API at the C level, and I doubt there is any convenience API at the Java level either. The simplest is to use the /domain/devices/disk XPath expression result on the domain XML to get back the list. http://libvirt.org/formatdomain.html#elementsDisks Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Andrea Turli
-
Daniel Veillard