« Previous | Next » 

Revision 546cdf7a

ID546cdf7ab0318084f24b9109a697a67a41b342f3
Parent 7b648a55
Child 13bb1b4c

Added by Apollon Oikonomopoulos over 9 years ago

(2.12) QMP: always return the command result

According to the QEMU Machine Protocol Specification, the messages sent
by QMP as a response to a command can be of two types: either an error
message (identified by the "error" key), or a success message
(identified by the "return" key).

Since we explicitly handle errors by raising a HypervisorError, there is
no reason to return the whole response message; instead we return only
the response part, which is the dual behavior of accepting commands from
the callers without the surrounding {"execute": ...} object.

We also unexport the RETURN_KEY constant, which is now only used
internally.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Thomas Thrainer <>
Reviewed-by: Thomas Thrainer <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences