[Libvir] PATCH: Add missing APIs to python binding
veillard at redhat.com
Mon Jan 21 14:02:09 UTC 2008
On Mon, Jan 21, 2008 at 01:58:07PM +0000, Daniel P. Berrange wrote:
> On Mon, Jan 21, 2008 at 04:04:46AM -0500, Daniel Veillard wrote:
> > On Sun, Jan 20, 2008 at 05:23:46PM +0000, Daniel P. Berrange wrote:
> > > The python binding is missing all the APIs relating to CPU pinning and
> > > schedular parameters because they are too hard for the generator to manage.
> > [...]
> > > The generator fails on the C code part of the bindings completely, so that
> > > is hand-written. It also fails on the python part of the bindings, but
> > > the way the generator is structured doesn't enable us to hand-write the
> > > python part for methods within objects :-( So I have basically just editted
> > > the generator to blacklist all the out-parameters, and blacklist the in
> > > parameters which specify list lengths.
> > I'm not sure why you had to patch the generator.py , could you explain
> > a bit ? Also I don't see in the patch any extra entry in
> > python/libvirt-python-api.xml , its purpose is to help the generator
> > writing the python side of the bindings for hand generated ones. So i
> > wonder if the two are not related.
> I've no idea what python/libvirt-python-api.xml does - it just seems to
> duplicate info already in docs/libvirt-api.xml ?
Well, docs/libvirt-api.xml is automatically generated from the headers
(and C modules), but python/libvirt-python-api.xml is manually created
to describe similar input but for the functions where the C binding is done
manually. This allows the generator to plug them at the libvirt.py level.
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the libvir-list