From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykjzw-0005Wj-O9 for qemu-devel@nongnu.org; Tue, 21 Apr 2015 22:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ykjzt-0005K7-BO for qemu-devel@nongnu.org; Tue, 21 Apr 2015 22:02:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykjzt-0005Jr-4M for qemu-devel@nongnu.org; Tue, 21 Apr 2015 22:02:41 -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 t3M22eTh029391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 21 Apr 2015 22:02:40 -0400 From: John Snow Date: Tue, 21 Apr 2015 22:02:30 -0400 Message-Id: <1429668155-1606-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH 0/5] scripts: qmp-shell: add transaction support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com, John Snow , kchamart@redhat.com 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 (3) Allow users to use 'single quotes' instead of "double quotes" (4) Add a special transaction( ... ) syntax that lets users build up transactional commands using the existing qmp shell syntax to define each action. (5) 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. John Snow (5): scripts: qmp-shell: refactor helpers scripts: qmp-shell: add support for [] expressions scripts: qmp-shell: allow single-quotes in JSON expressions scripts: qmp-shell: add transaction subshell scripts: qmp-shell: Add verbose flag scripts/qmp/qmp-shell | 90 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 17 deletions(-) -- 2.1.0