summaryrefslogtreecommitdiffstats
path: root/QMP
Commit message (Collapse)AuthorAgeFilesLines
* qmp: document strict parsingPaolo Bonzini2012-03-271-3/+17
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qmp: add DEVICE_TRAY_MOVED eventLuiz Capitulino2012-02-221-0/+18
| | | | | | | | | It's emitted whenever the tray is moved by the guest or by HMP/QMP commands. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
* qom: add test toolsAnthony Liguori2012-02-223-0/+195
| | | | | | | Tested-by: Andreas F=E4rber <afaerber@suse.de> 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>
* qmp: make qmp.py easier to useAnthony Liguori2012-02-221-0/+6
| | | | | | 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>
* qmp: add block_job_cancel commandStefan Hajnoczi2012-01-261-0/+24
| | | | | | | | | | Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: add block_stream commandStefan Hajnoczi2012-01-261-0/+29
| | | | | | | | | | | | Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: add test tool for QMPMark Wu2011-12-061-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | Anthony wrote this quickly to aid in testing. It's similar to qmp-shell with a few important differences: 1) It is not interactive. That makes it useful for scripting. 2) qmp-shell: (QEMU) set_password protocol=vnc password=foo 3) qmp: $ qmp set_password --protocol=vnc --password=foo 4) Extensible, git-style interface. If an invalid command name is passed, it will try to exec qmp-$1. 5) It attempts to pretty print the JSON responses in a shell friendly format such that tools can work with the output. Hope others will also find it useful. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* fix spelling in QMP sub directoryDong Xu Wang2011-12-021-1/+1
| | | | | | | Cc: Markus Armbruster <armbru@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* QMP: add server mode to QEMUMonitorProtocolStefan Hajnoczi2011-06-011-11/+32
| | | | | | | | | | | | | | | | | | | QEMU supports socket chardevs that establish connections like a server or a client. The QEMUMonitorProtocol class only supports connecting as a client. It is not possible to connect race-free when launching QEMU since trying to connect before QEMU has bound and is listening on the socket results in failure. Add the QEMUMonitorProtocol(server=True) argument to bind and listen on the socket. The QEMU process can then be launched and connects to the already existing QMP socket without a race condition: qmp = qmp.QEMUMonitorProtocol(monitor_path, server=True) popen = subprocess.Popen(args) qmp.accept() Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: add get_events(wait=True) optionStefan Hajnoczi2011-06-011-3/+8
| | | | | | | | | The get_events() function polls for new QMP events and then returns. It can be useful to wait for the next QMP event so add the boolean 'wait' keyword argument. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* spice: connection events.Gerd Hoffmann2010-12-091-0/+64
| | | | | | | | | | This patch adds support for connection events to spice. The events are quite simliar to the vnc events. Unlike vnc spice uses multiple tcp channels though. qemu will report every single tcp connection (aka spice channel). If you want track spice sessions only you can filter for the main channel (channel-type == 1). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* QMP/qmp-shell: Introduce HMP modeLuiz Capitulino2010-11-171-1/+78
| | | | | | | | | | | | | | | | | | | | In which qmp-shell will exclusively use the HMP passthrough feature, this is useful for testing. Example: # ./qmp-shell -H qmp-sock Welcome to the HMP shell! Connected to QEMU 0.13.50 (QEMU) info network VLAN 0 devices: user.0: net=10.0.2.0, restricted=n e1000.0: model=e1000,macaddr=52:54:00:12:34:56 Devices not on any VLAN: (QEMU) Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Drop vm-info example scriptLuiz Capitulino2010-11-172-37/+1
| | | | | | It's broken and not really useful, let's just drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Revamp the qmp-shell scriptLuiz Capitulino2010-11-171-35/+144
| | | | | | | | | | | | | | This commit updates the qmp-shell script to use the new interface introduced by the last commit. Additionally, the following fixes/features are also introduced: o TCP sockets support o Update/add documentation o Simple command-line completion o Fix a number of unhandled errors Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Revamp the Python class exampleLuiz Capitulino2010-11-171-51/+106
| | | | | | | | | | | | | | | | | | | | | | This commit simplifies and fixes a number of problems in the Python QEMUMonitorProtocol example class. It's almost a rewrite and it DOES BREAK the qmp-shell script (which is going to be fixed in the next commit). However, I'm not going to split this in different commits because it could get up to 10 commits, it's really not worth it for a simple demo class. Highlights: o TCP sockets support o QMP events support o Add documentation o Fix a number of unhandled errors o Simplify methods that send commands to the Monitor Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Trivial fix for QMP/qmp-events.txtHidetoshi Seto2010-10-221-1/+1
| | | | | | | Fix example of STOP event that was just copy-and-pasted. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP/README: Update QMP homepage addressLuiz Capitulino2010-10-011-1/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Monitor: Introduce the qmp-commands.hx fileLuiz Capitulino2010-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This file contains a copy of the following information from the qemu-monitor.hx file: o QObject handlers entries o QMP documentation (all SQMP/EQMP sections) Right now it's only used to generate the QMP docs in QMP/, but next commits will turn this into QMP's command dispatch table. It's important to note that QObject handlers entries are going to get duplicated: they will exist in both QMP's and HMP's dispatch tables. This will be fixed in the near future, when we add a proper QMP call interface and HMP is converted to use it. This way we can completely drop QObject handlers entries from HMP's tables. NOTE: HMP specific constructions, like "q|quit", have been dropped. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Update README fileLuiz Capitulino2010-08-221-23/+48
| | | | | | | | | | | | A number of changes I prefer to do in one shot: - Fix example - Small clarifications - Add multiple monitors example - Add 'Development Process' section Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Fix python helper /wrt long return stringsJan Kiszka2010-07-011-1/+5
| | | | | | | | Remove the arbitrary limitation of 1024 characters per return string and read complete lines instead. Required for device_show. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Teach basic capability negotiation to python exampleJan Kiszka2010-07-012-0/+2
| | | | | | | | As sending "qmp_capabilities" on session start became mandatory, both python examples were broken. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* monitor/QMP: Drop info hpet / query-hpetJan Kiszka2010-06-131-1/+1
| | | | | | | | | | This command was of minimal use before, now it is useless as the hpet become a qdev device and is thus easily discoverable. We should definitely not set query-hpet in QMP's stone, and there is also no good reason to keep it for the interactive monitor. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* QMP: Introduce commands documentationJan Kiszka2010-06-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | One of the most important missing feature in QMP today is its supported commands documentation. The plan is to make it part of self-description support, however self-description is a big task we have been postponing for a long time now and still don't know when it's going to be done. In order not to compromise QMP adoption and make users' life easier, this commit adds a simple text documentation which fully describes all QMP supported commands. This is not ideal for a number of reasons (harder to maintain, text-only, etc) but does improve the current situation. To avoid at least divering from the user monitor help and texi snippets, QMP bits are also maintained inside qemu-monitor.hx, and hxtool is extended to generate a single text file from them. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Add "Downstream extension of QMP" to specMarkus Armbruster2010-05-191-0/+55
| | | | Signed-off-by: Markus Armbruster <armbru@redhat.com>
* QMP: Introduce RESUME eventLuiz Capitulino2010-05-031-0/+12
| | | | | | | | | | | | | It's emitted when the Virtual Machine resumes execution. We currently have the STOP event but don't have the matching RESUME one, this means that clients are notified when the VM is stopped but don't get anything when it resumes. Let's fix that as it's already causing some trouble to libvirt. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Improve RTC_CHANGE event descriptionLuiz Capitulino2010-04-181-1/+1
| | | | | | | Some people might think that this event is emitted whenever the time changes, be more specific. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: Introduce WATCHDOG eventLuiz Capitulino2010-03-091-0/+19
| | | | | | | | It's emitted whenever the watchdog device's timer expires. The action taken is provided in the 'data' member. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce RTC_CHANGE eventLuiz Capitulino2010-03-081-0/+15
| | | | | | | Emitted whenever the RTC time changes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Revamp the qmp-events.txt fileLuiz Capitulino2010-03-081-37/+133
| | | | | | | | | | | | Now we can say it's useful, the following changes have been made: - Put events in alphabetical order - Add examples to all events - Document all 'data' members - Small corrections and cleanups Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Drop DEBUG eventLuiz Capitulino2010-03-081-6/+0
| | | | | | | | | | | This event has been introduced in the first round of QMP commits, turns out that it's based on the usage of the EXCP_DEBUG macro, which has discussable semantics when exposed through QMP. As libvirt doesn't use this, let's just drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: spec: Capability negotiation updatesLuiz Capitulino2010-02-101-17/+29
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Add QEMU's version to the greeting messageLuiz Capitulino2010-02-102-4/+8
| | | | | | | | | | | | | | | | | With capability negotiation support clients will only have a chance to check QEMU's version (ie. issue 'query-version') after the negotiation procedure is done. It might be useful to clients to check QEMU's version before negotiating features, though. To allow that, this commit adds the QEMU's version object to the greeting message. Not really sure this is needed, but doesn't hurt anyway. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: BLOCK_IO_ERROR event handlingLuiz Capitulino2010-02-101-0/+21
| | | | | | | | | This commit adds the basic definitions for the BLOCK_IO_ERROR event, but actual event emission will be introduced by the next commits. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce VNC_INITIALIZED eventLuiz Capitulino2010-01-191-0/+6
| | | | | | | | | | | | | | | | | | | It's emitted when a VNC client session is activated by QEMU, client's information such as port, IP and auth ID (if the session is authenticated) are provided. Event example: { "event": "VNC_INITIALIZED", "timestamp": {"seconds": 1263475302, "microseconds": 150772}, "data": { "server": { "auth": "sasl", "family": "ipv4", "service": "5901", "host": "0.0.0.0"}, "client": { "family": "ipv4", "service": "46089", "host": "127.0.0.1", "sasl_username": "lcapitulino" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce VNC_DISCONNECTED eventLuiz Capitulino2010-01-191-0/+6
| | | | | | | | | | | | | | | | | | It's emitted when a VNC client disconnects from QEMU, client's information such as port and IP address are provided. Event example: { "event": "VNC_DISCONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 }, "data": { "server": { "auth": "sasl", "family": "ipv4", "service": "5901", "host": "0.0.0.0" }, "client": { "family": "ipv4", "service": "58425", "host": "127.0.0.1", "sasl_username": "foo" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce VNC_CONNECTED eventLuiz Capitulino2010-01-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | It's emitted when a VNC client connects to QEMU, client's information such as port and IP address are provided. Note that this event is emitted right when the connection is established. This means that it happens before authentication procedure and session initialization. Event example: { "event": "VNC_CONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 }, "data": { "server": { "auth": "sasl", "family": "ipv4", "service": "5901", "host": "0.0.0.0" }, "client": { "family": "ipv4", "service": "58425", "host": "127.0.0.1" } } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Update spec fileLuiz Capitulino2009-12-191-26/+34
| | | | | | | | | | | | - Remove "draft" status - Change default success response to be json-object - Change error and event data member to be a json-object - Update examples - Add new section "Compatibility Considerations" - Other fixes and clarifications Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Update README fileLuiz Capitulino2009-12-191-11/+23
| | | | | | | | | - Fix output description - Fix command-line usage notes - Minor improvements Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: add human-readable description to error responseMarkus Armbruster2009-12-071-1/+4
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce vm-infoLuiz Capitulino2009-12-031-0/+32
| | | | | | | A Python script which uses qmp.py to print some simple VM info. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce qmp-shellLuiz Capitulino2009-12-032-0/+144
| | | | | | | | | | | | | | | | | | | | This is a very simple shell written in Python for demonstration purposes. Unfortunately it's a bit awkward right now, as the user has to specify the arguments names and the printed data can be a raw dictionary or list, like the following example: (QEMU) pci_add pci_addr=auto type=nic {u'slot': 5, u'bus': 0, u'domain': 0, u'function': 0} (QEMU) It's worth to note that the shell is broken into two files. One is the shell itself, the other is the QMP class which handles the communication with QEMU. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce qmp-events.txtLuiz Capitulino2009-12-031-0/+26
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce specificationLuiz Capitulino2009-12-031-0/+192
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce README fileLuiz Capitulino2009-12-031-0/+51
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud