Skip to content
  • Apollon Oikonomopoulos's avatar
    QMP: always return the command result · 24d3d8da
    Apollon Oikonomopoulos authored
    
    
    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: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
    Signed-off-by: default avatarThomas Thrainer <thomasth@google.com>
    Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
    24d3d8da