qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support
@ 2015-04-22 16:21 John Snow
  2015-04-22 16:21 ` [Qemu-devel] [PATCH v2 1/4] scripts: qmp-shell: refactor helpers John Snow
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: John Snow @ 2015-04-22 16:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Snow, lcapitulino, kchamart

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.

===
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 | 125 ++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 95 insertions(+), 30 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-04-23 13:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22 16:21 [Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support John Snow
2015-04-22 16:21 ` [Qemu-devel] [PATCH v2 1/4] scripts: qmp-shell: refactor helpers John Snow
2015-04-22 16:21 ` [Qemu-devel] [PATCH v2 2/4] scripts: qmp-shell: Expand support for QMP expressions John Snow
2015-04-22 16:41   ` John Snow
2015-04-22 17:18   ` Eric Blake
2015-04-22 17:25     ` Eric Blake
2015-04-22 17:33     ` John Snow
2015-04-22 16:21 ` [Qemu-devel] [PATCH v2 3/4] scripts: qmp-shell: add transaction subshell John Snow
2015-04-22 16:21 ` [Qemu-devel] [PATCH v2 4/4] scripts: qmp-shell: Add verbose flag John Snow
2015-04-22 19:27 ` [Qemu-devel] [PATCH v2 0/4] scripts: qmp-shell: add transaction support John Snow
2015-04-23 13:11   ` Luiz Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).