qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction supp


From: John Snow
Subject: Re: [Qemu-devel] [PATCH v3 0/4] scripts: qmp-shell: add transaction support
Date: Thu, 23 Apr 2015 12:23:08 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0



On 04/23/2015 10:34 AM, 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
(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.

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


NACK for now, sorry for the noise, everyone. Kashyap found a bug while testing with this.

Thanks, Kashyap!



reply via email to

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