[Ovirt-devel] Managed Node qpid Modeling

David Lutterkort dlutter at redhat.com
Thu Jul 10 20:59:33 UTC 2008


On Thu, 2008-07-10 at 07:49 -0400, Daniel Veillard wrote:
>   Note the availability of an existing XML description of libvirt APIs
>     http://libvirt.org/libvirt-api.xml
> 
> Also installed under
>   /usr/share/doc/libvirt-*/libvirt-api.xml
> 
> you will find for example:
> 
> ....
>     <function name='virDomainCreateLinux' file='libvirt' module='libvirt'>
>       <info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor.</info>
>       <return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
>       <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
>       <arg name='xmlDesc' type='const char *' info='string containing an XML description of the domain'/>
>       <arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/>
>     </function>
> ....
> 
>   I use that to (mostly) automatize the python libvirt bindings. I do no
> suggest to do the same but a simple XSLT or scripting using those data may
> help doing the AMQP bindings.

One piece of info that is missing from the above XML, but needed for the
qpid API is the notion of calling a method on an object. The above only
has enough information to generate C-style function calls.

It's also missing information about what are input and what are output
parameters.

How about adding an attribute 'role' to the <arg> element that would
take one of three values: input, output or receiver, where 'receiver'
says that that is logically the object to which the function/method
belongs ?

David





More information about the ovirt-devel mailing list