
On 03/18/2011 07:36 AM, Daniel P. Berrange wrote:
On Fri, Mar 18, 2011 at 09:42:12AM +0100, Michal Novotny wrote:
Hi, I've been investigating the virConnectDomainXMLToNative() format option and I found out the virConnectDomainXMLToNative() calls the conn->driver->domainXMLToNative() function and passes the format to the driver function where the check whether format is valid or not is being performed. Unfortunately I was unable to get the list of supported format strings (like "qemu-argv"/"xen-xm"/"xen-sexpr" etc.) so I'd like to ask whether there is some API to get all the formats supported by the driver or not.
If not, wouldn't it be worth it to add some API like virConnectGetDomainNativeFormats() or something to return the format option for the connection?
I guess many people would be having issues with that and although it's documented in the virsh man pages what if somebody will be using some other application than virsh or you add some formatting option however you forget to add it to the man page?
I think it's worth it to consider adding conn->driver->domainNativeFormats() to the driver and placing it nearby the conn->driver->domainXMLToNative() function in the driver (like right above qemuDomainXMLToNative() etc.). Yes, we could add an API for this purpose. I think rather than an API we should just stuff the list somewhere in capabilities XML.
- Cole Well, that's a good idea, Cole. Listing this could be good. In fact I don't care much but I'd like some way to get the list of domain native
On 03/21/2011 02:37 PM, Cole Robinson wrote: formats for the hypervisor. I've been trying to write it yesterday since I was finally feeling better but I was unable to make it working yet. At least I've learned something new about the libvirt infrastructure and having it in the capabilities is a pretty good idea AFAIK. Michal -- Michal Novotny<minovotn@redhat.com>, RHCE Virtualization Team (xen userspace), Red Hat