get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/808749/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808749,
    "url": "http://patchwork.ozlabs.org/api/patches/808749/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-26-armbru@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170901153758.8628-26-armbru@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-01T15:37:36",
    "name": "[PULL,v2,25/47] qapi-schema: Collect transaction stuff in qapi/transaction.json",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1840106fa7eec19cb56e9dafb7dd9e63a6fe875e",
    "submitter": {
        "id": 2645,
        "url": "http://patchwork.ozlabs.org/api/people/2645/?format=api",
        "name": "Markus Armbruster",
        "email": "armbru@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-26-armbru@redhat.com/mbox/",
    "series": [
        {
            "id": 1049,
            "url": "http://patchwork.ozlabs.org/api/series/1049/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1049",
            "date": "2017-09-01T15:37:14",
            "name": "[PULL,v2,01/47] qapi: Fix error handling code on alternate conflict",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/1049/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808749/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808749/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=armbru@redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkP0f1B8xz9t3P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 01:53:20 +1000 (AEST)",
            "from localhost ([::1]:46553 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnoFy-0004t1-9h\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 11:53:18 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:51559)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1O-0006fi-2V\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:18 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1L-0001iK-Ly\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:14 -0400",
            "from mx1.redhat.com ([209.132.183.28]:34224)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1dno1L-0001gt-5E\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:11 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 187277EAA0\n\tfor <qemu-devel@nongnu.org>; Fri,  1 Sep 2017 15:38:10 +0000 (UTC)",
            "from blackfin.pond.sub.org (ovpn-116-75.ams2.redhat.com\n\t[10.36.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 8C5637849C\n\tfor <qemu-devel@nongnu.org>; Fri,  1 Sep 2017 15:38:09 +0000 (UTC)",
            "by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 8D07A1132F3A; Fri,  1 Sep 2017 17:37:58 +0200 (CEST)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 187277EAA0",
        "From": "Markus Armbruster <armbru@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Fri,  1 Sep 2017 17:37:36 +0200",
        "Message-Id": "<20170901153758.8628-26-armbru@redhat.com>",
        "In-Reply-To": "<20170901153758.8628-1-armbru@redhat.com>",
        "References": "<20170901153758.8628-1-armbru@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tFri, 01 Sep 2017 15:38:10 +0000 (UTC)",
        "Content-Transfer-Encoding": "quoted-printable",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PULL v2 25/47] qapi-schema: Collect transaction stuff\n\tin qapi/transaction.json",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Signed-off-by: Markus Armbruster <armbru@redhat.com>\nMessage-Id: <1503602048-12268-11-git-send-email-armbru@redhat.com>\nReviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n---\n MAINTAINERS           |   1 +\n Makefile              |   1 +\n qapi-schema.json      | 151 +----------------------------------------------\n qapi/transaction.json | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++\n 4 files changed, 161 insertions(+), 150 deletions(-)\n create mode 100644 qapi/transaction.json",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex baa9859b4a..8cebd798ef 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1231,6 +1231,7 @@ S: Supported\n F: blockdev.c\n F: block/qapi.c\n F: qapi/block*.json\n+F: qapi/transaction.json\n T: git git://repo.or.cz/qemu/armbru.git block-next\n \n Dirty Bitmaps\ndiff --git a/Makefile b/Makefile\nindex 18cf670833..ea6de37197 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -419,6 +419,7 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \\\n                $(SRC_PATH)/qapi/run-state.json \\\n                $(SRC_PATH)/qapi/sockets.json \\\n                $(SRC_PATH)/qapi/trace.json \\\n+               $(SRC_PATH)/qapi/transaction.json \\\n                $(SRC_PATH)/qapi/ui.json\n \n qapi-types.c qapi-types.h :\\\ndiff --git a/qapi-schema.json b/qapi-schema.json\nindex 21f54ea1a2..4108ef0cc8 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -88,6 +88,7 @@\n { 'include': 'qapi/rocker.json' }\n { 'include': 'qapi/ui.json' }\n { 'include': 'qapi/migration.json' }\n+{ 'include': 'qapi/transaction.json' }\n { 'include': 'qapi/event.json' }\n { 'include': 'qapi/trace.json' }\n { 'include': 'qapi/introspect.json' }\n@@ -1097,156 +1098,6 @@\n { 'command': 'balloon', 'data': {'value': 'int'} }\n \n ##\n-# @Abort:\n-#\n-# This action can be used to test transaction failure.\n-#\n-# Since: 1.6\n-##\n-{ 'struct': 'Abort',\n-  'data': { } }\n-\n-##\n-# @ActionCompletionMode:\n-#\n-# An enumeration of Transactional completion modes.\n-#\n-# @individual: Do not attempt to cancel any other Actions if any Actions fail\n-#              after the Transaction request succeeds. All Actions that\n-#              can complete successfully will do so without waiting on others.\n-#              This is the default.\n-#\n-# @grouped: If any Action fails after the Transaction succeeds, cancel all\n-#           Actions. Actions do not complete until all Actions are ready to\n-#           complete. May be rejected by Actions that do not support this\n-#           completion mode.\n-#\n-# Since: 2.5\n-##\n-{ 'enum': 'ActionCompletionMode',\n-  'data': [ 'individual', 'grouped' ] }\n-\n-##\n-# @TransactionAction:\n-#\n-# A discriminated record of operations that can be performed with\n-# @transaction. Action @type can be:\n-#\n-# - @abort: since 1.6\n-# - @block-dirty-bitmap-add: since 2.5\n-# - @block-dirty-bitmap-clear: since 2.5\n-# - @blockdev-backup: since 2.3\n-# - @blockdev-snapshot: since 2.5\n-# - @blockdev-snapshot-internal-sync: since 1.7\n-# - @blockdev-snapshot-sync: since 1.1\n-# - @drive-backup: since 1.6\n-#\n-# Since: 1.1\n-##\n-{ 'union': 'TransactionAction',\n-  'data': {\n-       'abort': 'Abort',\n-       'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',\n-       'block-dirty-bitmap-clear': 'BlockDirtyBitmap',\n-       'blockdev-backup': 'BlockdevBackup',\n-       'blockdev-snapshot': 'BlockdevSnapshot',\n-       'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',\n-       'blockdev-snapshot-sync': 'BlockdevSnapshotSync',\n-       'drive-backup': 'DriveBackup'\n-   } }\n-\n-##\n-# @TransactionProperties:\n-#\n-# Optional arguments to modify the behavior of a Transaction.\n-#\n-# @completion-mode: Controls how jobs launched asynchronously by\n-#                   Actions will complete or fail as a group.\n-#                   See @ActionCompletionMode for details.\n-#\n-# Since: 2.5\n-##\n-{ 'struct': 'TransactionProperties',\n-  'data': {\n-       '*completion-mode': 'ActionCompletionMode'\n-  }\n-}\n-\n-##\n-# @transaction:\n-#\n-# Executes a number of transactionable QMP commands atomically. If any\n-# operation fails, then the entire set of actions will be abandoned and the\n-# appropriate error returned.\n-#\n-# For external snapshots, the dictionary contains the device, the file to use for\n-# the new snapshot, and the format.  The default format, if not specified, is\n-# qcow2.\n-#\n-# Each new snapshot defaults to being created by QEMU (wiping any\n-# contents if the file already exists), but it is also possible to reuse\n-# an externally-created file.  In the latter case, you should ensure that\n-# the new image file has the same contents as the current one; QEMU cannot\n-# perform any meaningful check.  Typically this is achieved by using the\n-# current image file as the backing file for the new image.\n-#\n-# On failure, the original disks pre-snapshot attempt will be used.\n-#\n-# For internal snapshots, the dictionary contains the device and the snapshot's\n-# name.  If an internal snapshot matching name already exists, the request will\n-# be rejected.  Only some image formats support it, for example, qcow2, rbd,\n-# and sheepdog.\n-#\n-# On failure, qemu will try delete the newly created internal snapshot in the\n-# transaction.  When an I/O error occurs during deletion, the user needs to fix\n-# it later with qemu-img or other command.\n-#\n-# @actions: List of @TransactionAction;\n-#           information needed for the respective operations.\n-#\n-# @properties: structure of additional options to control the\n-#              execution of the transaction. See @TransactionProperties\n-#              for additional detail.\n-#\n-# Returns: nothing on success\n-#\n-#          Errors depend on the operations of the transaction\n-#\n-# Note: The transaction aborts on the first failure.  Therefore, there will be\n-# information on only one failed operation returned in an error condition, and\n-# subsequent actions will not have been attempted.\n-#\n-# Since: 1.1\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"transaction\",\n-#      \"arguments\": { \"actions\": [\n-#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"device\": \"ide-hd0\",\n-#                                      \"snapshot-file\": \"/some/place/my-image\",\n-#                                      \"format\": \"qcow2\" } },\n-#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"node-name\": \"myfile\",\n-#                                      \"snapshot-file\": \"/some/place/my-image2\",\n-#                                      \"snapshot-node-name\": \"node3432\",\n-#                                      \"mode\": \"existing\",\n-#                                      \"format\": \"qcow2\" } },\n-#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"device\": \"ide-hd1\",\n-#                                      \"snapshot-file\": \"/some/place/my-image2\",\n-#                                      \"mode\": \"existing\",\n-#                                      \"format\": \"qcow2\" } },\n-#          { \"type\": \"blockdev-snapshot-internal-sync\", \"data\" : {\n-#                                      \"device\": \"ide-hd2\",\n-#                                      \"name\": \"snapshot0\" } } ] } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'transaction',\n-  'data': { 'actions': [ 'TransactionAction' ],\n-            '*properties': 'TransactionProperties'\n-          }\n-}\n-\n-##\n # @human-monitor-command:\n #\n # Execute a command on the human monitor and return the output.\ndiff --git a/qapi/transaction.json b/qapi/transaction.json\nnew file mode 100644\nindex 0000000000..bd312792da\n--- /dev/null\n+++ b/qapi/transaction.json\n@@ -0,0 +1,158 @@\n+# -*- Mode: Python -*-\n+#\n+\n+##\n+# = Transactions\n+##\n+\n+{ 'include': 'block.json' }\n+\n+##\n+# @Abort:\n+#\n+# This action can be used to test transaction failure.\n+#\n+# Since: 1.6\n+##\n+{ 'struct': 'Abort',\n+  'data': { } }\n+\n+##\n+# @ActionCompletionMode:\n+#\n+# An enumeration of Transactional completion modes.\n+#\n+# @individual: Do not attempt to cancel any other Actions if any Actions fail\n+#              after the Transaction request succeeds. All Actions that\n+#              can complete successfully will do so without waiting on others.\n+#              This is the default.\n+#\n+# @grouped: If any Action fails after the Transaction succeeds, cancel all\n+#           Actions. Actions do not complete until all Actions are ready to\n+#           complete. May be rejected by Actions that do not support this\n+#           completion mode.\n+#\n+# Since: 2.5\n+##\n+{ 'enum': 'ActionCompletionMode',\n+  'data': [ 'individual', 'grouped' ] }\n+\n+##\n+# @TransactionAction:\n+#\n+# A discriminated record of operations that can be performed with\n+# @transaction. Action @type can be:\n+#\n+# - @abort: since 1.6\n+# - @block-dirty-bitmap-add: since 2.5\n+# - @block-dirty-bitmap-clear: since 2.5\n+# - @blockdev-backup: since 2.3\n+# - @blockdev-snapshot: since 2.5\n+# - @blockdev-snapshot-internal-sync: since 1.7\n+# - @blockdev-snapshot-sync: since 1.1\n+# - @drive-backup: since 1.6\n+#\n+# Since: 1.1\n+##\n+{ 'union': 'TransactionAction',\n+  'data': {\n+       'abort': 'Abort',\n+       'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',\n+       'block-dirty-bitmap-clear': 'BlockDirtyBitmap',\n+       'blockdev-backup': 'BlockdevBackup',\n+       'blockdev-snapshot': 'BlockdevSnapshot',\n+       'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',\n+       'blockdev-snapshot-sync': 'BlockdevSnapshotSync',\n+       'drive-backup': 'DriveBackup'\n+   } }\n+\n+##\n+# @TransactionProperties:\n+#\n+# Optional arguments to modify the behavior of a Transaction.\n+#\n+# @completion-mode: Controls how jobs launched asynchronously by\n+#                   Actions will complete or fail as a group.\n+#                   See @ActionCompletionMode for details.\n+#\n+# Since: 2.5\n+##\n+{ 'struct': 'TransactionProperties',\n+  'data': {\n+       '*completion-mode': 'ActionCompletionMode'\n+  }\n+}\n+\n+##\n+# @transaction:\n+#\n+# Executes a number of transactionable QMP commands atomically. If any\n+# operation fails, then the entire set of actions will be abandoned and the\n+# appropriate error returned.\n+#\n+# For external snapshots, the dictionary contains the device, the file to use for\n+# the new snapshot, and the format.  The default format, if not specified, is\n+# qcow2.\n+#\n+# Each new snapshot defaults to being created by QEMU (wiping any\n+# contents if the file already exists), but it is also possible to reuse\n+# an externally-created file.  In the latter case, you should ensure that\n+# the new image file has the same contents as the current one; QEMU cannot\n+# perform any meaningful check.  Typically this is achieved by using the\n+# current image file as the backing file for the new image.\n+#\n+# On failure, the original disks pre-snapshot attempt will be used.\n+#\n+# For internal snapshots, the dictionary contains the device and the snapshot's\n+# name.  If an internal snapshot matching name already exists, the request will\n+# be rejected.  Only some image formats support it, for example, qcow2, rbd,\n+# and sheepdog.\n+#\n+# On failure, qemu will try delete the newly created internal snapshot in the\n+# transaction.  When an I/O error occurs during deletion, the user needs to fix\n+# it later with qemu-img or other command.\n+#\n+# @actions: List of @TransactionAction;\n+#           information needed for the respective operations.\n+#\n+# @properties: structure of additional options to control the\n+#              execution of the transaction. See @TransactionProperties\n+#              for additional detail.\n+#\n+# Returns: nothing on success\n+#\n+#          Errors depend on the operations of the transaction\n+#\n+# Note: The transaction aborts on the first failure.  Therefore, there will be\n+# information on only one failed operation returned in an error condition, and\n+# subsequent actions will not have been attempted.\n+#\n+# Since: 1.1\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"transaction\",\n+#      \"arguments\": { \"actions\": [\n+#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"device\": \"ide-hd0\",\n+#                                      \"snapshot-file\": \"/some/place/my-image\",\n+#                                      \"format\": \"qcow2\" } },\n+#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"node-name\": \"myfile\",\n+#                                      \"snapshot-file\": \"/some/place/my-image2\",\n+#                                      \"snapshot-node-name\": \"node3432\",\n+#                                      \"mode\": \"existing\",\n+#                                      \"format\": \"qcow2\" } },\n+#          { \"type\": \"blockdev-snapshot-sync\", \"data\" : { \"device\": \"ide-hd1\",\n+#                                      \"snapshot-file\": \"/some/place/my-image2\",\n+#                                      \"mode\": \"existing\",\n+#                                      \"format\": \"qcow2\" } },\n+#          { \"type\": \"blockdev-snapshot-internal-sync\", \"data\" : {\n+#                                      \"device\": \"ide-hd2\",\n+#                                      \"name\": \"snapshot0\" } } ] } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'transaction',\n+  'data': { 'actions': [ 'TransactionAction' ],\n+            '*properties': 'TransactionProperties'\n+          }\n+}\n",
    "prefixes": [
        "PULL",
        "v2",
        "25/47"
    ]
}