[Libvir] PATCH: Add missing APIs to python binding

Daniel P. Berrange berrange at redhat.com
Mon Jan 21 16:08:27 UTC 2008


On Mon, Jan 21, 2008 at 09:29:12AM -0500, Daniel Veillard wrote:
> On Mon, Jan 21, 2008 at 02:26:36PM +0000, Daniel P. Berrange wrote:
> > On Mon, Jan 21, 2008 at 09:02:09AM -0500, Daniel Veillard wrote:
> > > 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.
> > 
> > Ok, here's a re-done patch to use that to override the python signature
> 
>   Looks fine by me, +1
> then the other patch can be pushed too to insure we keep full coverage,

Committed.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list