[virt-tools-list] Re: libosinfo - another try

Richard W.M. Jones rjones at redhat.com
Thu Oct 22 18:16:05 UTC 2009


On Thu, Oct 22, 2009 at 06:52:00PM +0100, Daniel P. Berrange wrote:
> It is fairly important that this data store be user updatable, without
> negatively impacting RPM upgrades. So should not be one single giant
> file, but rather lots of individual files so users can easily add in
> data 

And also in the case where other RPMs wanted to add to this
database too.

> > /* Setting parameters like libvirt version, etc. */
> > int osi_setLibParam(osi_lib_t lib, cstring key, cstring val);
> > int osi_getLibParam(osi_lib_t lib, cstring key);
> 
> Unless there's a really compelling reason not to, it is better to use
> standard   'char *' or 'const char *' for strings - it makes life much
> nicer for people writing bindings to other languages.

Although I'd really urge that you model the interface in something
which is *not* C, and then generate all the language bindings
(including C) from that model.

We used this in libguestfs and it's a huge success.  It just great to
be able to add a new API call in a few lines and have the bindings
done automatically (in 8 programming languages), plus all the
documentation updated.

http://rwmj.wordpress.com/2009/04/29/contributing-a-libguestfs-enhancement-with-examples/#content

Similar idea although the implementation is not so good:

http://live.gnome.org/GObjectIntrospection

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




More information about the virt-tools-list mailing list