提交 8d7e8457 编写于 作者: J Jan Kiszka 提交者: Luiz Capitulino

QMP: Teach basic capability negotiation to python example

As sending "qmp_capabilities" on session start became mandatory, both
python examples were broken.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 8ac470c1
......@@ -42,6 +42,7 @@ def main():
qemu = qmp.QEMUMonitorProtocol(argv[1])
qemu.connect()
qemu.send("qmp_capabilities")
print 'Connected!'
......
......@@ -24,6 +24,7 @@ def main():
qemu = qmp.QEMUMonitorProtocol(argv[1])
qemu.connect()
qemu.send("qmp_capabilities")
for cmd in [ 'version', 'kvm', 'status', 'uuid', 'balloon' ]:
print cmd + ': ' + str(qemu.send('query-' + cmd))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册