From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqiKt-0002aA-VF for qemu-devel@nongnu.org; Fri, 08 May 2015 09:29:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqiKq-0000A6-Fo for qemu-devel@nongnu.org; Fri, 08 May 2015 09:29:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqiKq-00009Q-8F for qemu-devel@nongnu.org; Fri, 08 May 2015 09:29:00 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t48DSxrX022369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 8 May 2015 09:28:59 -0400 Date: Fri, 8 May 2015 08:47:45 -0400 From: Luiz Capitulino Message-ID: <20150508084745.13179248@redhat.com> In-Reply-To: <1430334844-7015-1-git-send-email-jsnow@redhat.com> References: <1430334844-7015-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 0/4] scripts: qmp-shell: add transaction support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-devel@nongnu.org, kchamart@redhat.com On Wed, 29 Apr 2015 15:14:00 -0400 John Snow wrote: > The qmp-shell is a little rudimentary, but it can be hacked > to give us some transactional support without too much difficulty. > > (1) Prep. > (2) Add support for serializing json arrays and > improve the robustness of QMP parsing > (3) Add a special transaction( ... ) syntax that lets users > build up transactional commands using the existing qmp shell > syntax to define each action. > (4) Add a verbose flag to display generated QMP commands. > > The parsing is not as robust as one would like, but this suffices > without adding a proper parser. > > Design considerations: > > (1) Try not to disrupt the existing design of the qmp-shell. The existing > API is not disturbed. > (2) Pick a "magic token" such that it could not be confused for legitimate > QMP/JSON syntax. Parentheses are used for this purpose. > > For convenience, this branch is available at: > https://github.com/jnsnow/qemu.git branch qmp-shell++ > This version is tagged qmp-shell++-v4. Applied to the qmp branch, thanks. > > === > v++ > === > > - Use the AST to allow 'true', 'false' and 'null' within QMP expressions > - Fix a bunch of stupid junk I broke in v2, apparently. > > === > v3: > === > > - Folding in hotfix from list (import ast) > > === > v2: > === > > - Squash patches 2 & 3: > - Remove wholesale replacement of single quotes, in favor of try blocks > that attempt to parse as pure JSON, then as Python. > - Factored out the value parser block to accomplish the above. > - Allow both true/True and false/False for values. > - Fix typo in patch 3 cover letter. (was patch 4.) > > John Snow (4): > scripts: qmp-shell: refactor helpers > scripts: qmp-shell: Expand support for QMP expressions > scripts: qmp-shell: add transaction subshell > scripts: qmp-shell: Add verbose flag > > scripts/qmp/qmp-shell | 147 +++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 116 insertions(+), 31 deletions(-) >