From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJzfg-0003BZ-EC for qemu-devel@nongnu.org; Tue, 28 Jul 2015 03:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJzfb-0002Gd-FA for qemu-devel@nongnu.org; Tue, 28 Jul 2015 03:51:32 -0400 Date: Tue, 28 Jul 2015 09:51:21 +0200 From: Kashyap Chamarthy Message-ID: <20150728075121.GA13890@tesla.redhat.com> References: <1435775149-17285-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435775149-17285-1-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qmp-shell: add documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-trivial@nongnu.org, mjt@tls.msk.ru, qemu-devel@nongnu.org, lcapitulino@redhat.com On Wed, Jul 01, 2015 at 02:25:49PM -0400, John Snow wrote: > I should probably document the changes that were made. > > Signed-off-by: John Snow > --- > scripts/qmp/qmp-shell | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) Since I did some tests[1] when you wrote these improvements to qmp-shell, the change looks good, FWIW: Reviewed-By: Kashyap Chamarthy [1] https://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg04201.html > diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell > index 65280d2..fa39bf0 100755 > --- a/scripts/qmp/qmp-shell > +++ b/scripts/qmp/qmp-shell > @@ -29,6 +29,41 @@ > # (QEMU) device_add driver=e1000 id=net1 > # {u'return': {}} > # (QEMU) > +# > +# key=value pairs also support Python or JSON object literal subset notations, > +# without spaces. Dictionaries/objects {} are supported as are arrays []. > +# > +# example-command arg-name1={'key':'value','obj'={'prop':"value"}} > +# > +# Both JSON and Python formatting should work, including both styles of > +# string literal quotes. Both paradigms of literal values should work, > +# including null/true/false for JSON and None/True/False for Python. > +# > +# > +# Transactions have the following multi-line format: > +# > +# transaction( > +# action-name1 [ arg-name1=arg1 ] ... [arg-nameN=argN ] > +# ... > +# action-nameN [ arg-name1=arg1 ] ... [arg-nameN=argN ] > +# ) > +# > +# One line transactions are also supported: > +# > +# transaction( action-name1 ... ) > +# > +# For example: > +# > +# (QEMU) transaction( > +# TRANS> block-dirty-bitmap-add node=drive0 name=bitmap1 > +# TRANS> block-dirty-bitmap-clear node=drive0 name=bitmap0 > +# TRANS> ) > +# {"return": {}} > +# (QEMU) > +# > +# Use the -v and -p options to activate the verbose and pretty-print options, > +# which will echo back the properly formatted JSON-compliant QMP that is being > +# sent to QEMU, which is useful for debugging and documentation generation. > > import qmp > import json > -- > 2.1.0 > > -- /kashyap