On Fri, Apr 09, 2010 at 03:31:37PM +0100, Antoine Martin wrote: > [snip] > >> * not everything is exposed via libvirt: > >> virsh can retrieve vncdisplay > >> but libvirt (or at least the python bindings) does not. How come? > >> This happens to be one thing I need for writing a libvirt backend for my > >> virtual desktop software. > > > > The 'virsh vncdisplay' command is simply fetching the XML doc for the > > guest and then extracting the VNC port using a xpath expression > > > > /domain/devices/graphics[@type='vnc']/@port > > > > So for python you'd want to just get an XML handling module and do similar. > Yes, I saw that in the virsh code. > Shouldn't this be part of the libvirt api proper?? > Isn't it supposed to shield us from dealing with files and XML? > > Cheers > Antoine One of the things we would like to add is a wrapper around dumpxml and the various other commands that return xml. Such a thing would take an xpath query and return a single value, rather than an XML document. It's strictly convenience for callers that don't want to bother parsing their own XML but it seems like it would make things easier for people. Can't say exactly when it will be done, but it's on the roadmap for sure. Take care, --Hugh > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list -- ======================================================== Hugh Brock, hbrock@xxxxxxxxxx, +1-215-564-3232 Deltacloud API + Portal http://deltacloud.org Libvirt virtualization library http://libvirt.org ======================================================== -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list