qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qmp: add test tool for QMP


From: Alon Levy
Subject: Re: [Qemu-devel] [PATCH] qmp: add test tool for QMP
Date: Mon, 7 Nov 2011 19:26:15 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Nov 07, 2011 at 02:39:29PM -0200, Luiz Capitulino wrote:
> On Mon, 07 Nov 2011 10:35:51 -0600
> Anthony Liguori <address@hidden> wrote:
> 
> > On 11/07/2011 10:30 AM, Luiz Capitulino wrote:
> > > On Mon, 07 Nov 2011 10:09:55 -0600
> > > Anthony Liguori<address@hidden>  wrote:
> > >
> > >> On 11/07/2011 10:08 AM, Luiz Capitulino wrote:
> > >>> On Mon,  7 Nov 2011 09:11:15 -0600
> > >>> Anthony Liguori<address@hidden>   wrote:
> > >>>
> > >>>> I wrote this quickly to aid in testing.  It's similar to qmp-shell 
> > >>>> with a few
> > >>>> important differences:
> > >>>>
> > >>>> 1) It is not interactive.  That makes it useful for scripting.
> > >>>>
> > >>>> 2) qmp-shell:
> > >>>>
> > >>>> (QEMU) set_password protocol=vnc password=foo
> > >>>>
> > >>>> 3) qmp:
> > >>>>
> > >>>> $ qmp set_password --protocol=vnc --password=foo
> > >>>>
> > >>>> 4) Extensible, git-style interface.  If an invalid command name is 
> > >>>> passed, it
> > >>>>      will try to exec qmp-$1.
> > >>>>
> > >>>> 5) It attempts to pretty print the JSON responses in a shell friendly 
> > >>>> format
> > >>>>      such that tools can work with the output.
> > >>>>
> > >>>> Hope others will also find it useful.
> > >>>>
> > >>>> Signed-off-by: Anthony Liguori<address@hidden>
> > >>>
> > >>> Acked-by: Luiz Capitulino<address@hidden>
> > >>
> > >> BTW, one thing I'd like to try at some point soon is to generate man 
> > >> pages from
> > >> qapi-schema.json.  If you notice in the script, it does online help by 
> > >> invoking man.
> > >
> > > Yes, I did notice it. I didn't comment on it because I imagined you had 
> > > plans
> > > about it.
> > >
> > > PS: I don't think this needs to go through my tree.
> > 
> > What do you want to do with qmp.py?  Do you feel comfortable installing it 
> > in 
> > $PYTHONPATH and treating it as a supported API?
> 
> I probably don't. I coded it as demo in the very beginning of QMP, maybe
> we should first define what we expect from a QMP Python class then we
> can see whether it fits or not... I feel it needs to be revamped.
> 

It should not blocking, i.e. for event notification. I have a patch that
fixes that but breaks tab-completion.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]