[libvirt] [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt

Anthony Liguori anthony at codemonkey.ws
Thu Mar 25 15:59:22 UTC 2010


On 03/25/2010 09:09 AM, Luiz Capitulino wrote:
>
>> We can provide a generic QMP dispatch interface that high level
>> languages can use.  Then they can do fancy dispatch, treat QErrors as
>> exceptions, etc.
>>      
>   They can do that by accessing QMP directly. Why would a Python developer
> get in the mess of writing a Python binding for libqemu if they call do
> the exactly same thing by using its native json module?
>
>   Man, opening a QMP connection from Python and sending commands can be
> done with a few lines.
>    

Problem is, without a libqemu, libvirt cannot return a QMPContext that 
can be used by python bindings.   This is the problem that all high 
level languages have with respect to RPC transports.

You need libqemu to deal with establishing the transport.  That code 
needs to be common and shared across languages.

Dispatch can be handled by the high level language.

>> We just ought to also provide some simple C wrappers for all of the
>> functions.  Yes, the C interface is inferior to the generic interface
>> but that's fine.
>>      
>   Why don't we start with my simple lib suggestion and wait one or two
> releases to see what happens?
>    

I have no problem starting without the generated C wrappers.  But we 
need the core library to have the right abstractions with respect to 
transports.

Regards,

Anthony Liguori




More information about the libvir-list mailing list