mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-19 08:02:15 -06:00
qmp: make qmp.py easier to use
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
187c207d9b
commit
9f68f7fb12
1 changed files with 6 additions and 0 deletions
|
@ -128,6 +128,12 @@ class QEMUMonitorProtocol:
|
||||||
qmp_cmd['id'] = id
|
qmp_cmd['id'] = id
|
||||||
return self.cmd_obj(qmp_cmd)
|
return self.cmd_obj(qmp_cmd)
|
||||||
|
|
||||||
|
def command(self, cmd, **kwds):
|
||||||
|
ret = self.cmd(cmd, kwds)
|
||||||
|
if ret.has_key('error'):
|
||||||
|
raise Exception(ret['error']['desc'])
|
||||||
|
return ret['return']
|
||||||
|
|
||||||
def get_events(self, wait=False):
|
def get_events(self, wait=False):
|
||||||
"""
|
"""
|
||||||
Get a list of available QMP events.
|
Get a list of available QMP events.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue