From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuz1A-0008Ti-TG for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:11:24 -0400 Received: from [140.186.70.92] (port=58781 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nuz18-0008Su-Fg for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:11:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nuz17-0000q4-BT for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:11:22 -0400 Received: from mail2.shareable.org ([80.68.89.115]:58886) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nuz17-0000py-5g for qemu-devel@nongnu.org; Thu, 25 Mar 2010 22:11:21 -0400 Date: Fri, 26 Mar 2010 02:11:15 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt Message-ID: <20100326021115.GJ19308@shareable.org> References: <20100324182501.000b69a7@redhat.com> <4BAA86C2.4020701@codemonkey.ws> <4BAB1E21.8080009@snarc.org> <4BAB5805.9080000@codemonkey.ws> <4BAB58F1.20401@redhat.com> <4BAB68A2.6020707@codemonkey.ws> <4BAB69C9.6080704@redhat.com> <4BAB6BD0.1000509@codemonkey.ws> <20100325110959.35d805e5@redhat.com> <4BAB885A.5080604@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BAB885A.5080604@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "libvir-list@redhat.com" , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity , Vincent Hanquez , Paul Brook Anthony Liguori wrote: > 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. We can't libvirt talk QMG with Python over a pipe or local socket? So that the Python can talk to native qemu and via libvirt with the same code. That would be much easier from Python person than writing a wrapper around the C library. Multiplied by each high-level language... -- Jamie