]> git.proxmox.com Git - qemu.git/commit
qmp: switch to the new error format on the wire
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 27 Jul 2012 19:18:16 +0000 (16:18 -0300)
committerLuiz Capitulino <lcapitulino@redhat.com>
Mon, 13 Aug 2012 17:17:53 +0000 (14:17 -0300)
commitde253f14912e88f45dbe66984440d27221a75a60
tree54bae4f23b7de921b3dfbb8afc858eb66869dec1
parenta8cb2d302ea20d7ba1be184973fef29d7cab9407
qmp: switch to the new error format on the wire

IMPORTANT: this BREAKS QMP's compatibility for the error response.

This commit changes QMP's wire protocol to make use of the simpler
error format introduced by previous commits.

There are two important (and mostly incompatible) changes:

 1. Almost all error classes have been replaced by GenericError. The
    only classes that are still supported for compatibility with
    libvirt are: CommandNotFound, DeviceNotActive, KVMMissingCap,
    DeviceNotFound and MigrationExpected

 2. The 'data' field of the error dictionary is gone

As an example, an error response like:

  { "error": { "class": "DeviceNotRemovable",
               "data": { "device": "virtio0" },
               "desc": "Device 'virtio0' is not removable" } }

Will now be emitted as:

  { "error": { "class": "GenericError",
               "desc": "Device 'virtio0' is not removable" } }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
QMP/qmp-spec.txt
monitor.c
qapi-schema.json
qmp-commands.hx