[Ovirt-devel] Managed Node qpid Modeling
Daniel P. Berrange
berrange at redhat.com
Thu Jul 10 21:34:29 UTC 2008
On Thu, Jul 10, 2008 at 01:59:33PM -0700, David Lutterkort wrote:
> 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 ?
It ultimately wouldn't help much - you can only practically use this
info for methods without output parameters - the complexity is just
too hard to make automate it work all methods - I tried and failed to
fully automate python bindings.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the ovirt-devel
mailing list