summaryrefslogtreecommitdiff
path: root/QMP
AgeCommit message (Collapse)AuthorFilesLines
2010-12-09spice: connection events.Gerd Hoffmann1-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>
2010-11-17QMP/qmp-shell: Introduce HMP modeLuiz Capitulino1-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>
2010-11-17QMP: Drop vm-info example scriptLuiz Capitulino2-37/+1
It's broken and not really useful, let's just drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-11-17QMP: Revamp the qmp-shell scriptLuiz Capitulino1-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>
2010-11-17QMP: Revamp the Python class exampleLuiz Capitulino1-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>
2010-10-22Trivial fix for QMP/qmp-events.txtHidetoshi Seto1-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>
2010-10-01QMP/README: Update QMP homepage addressLuiz Capitulino1-1/+1
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-10-01Monitor: Introduce the qmp-commands.hx fileLuiz Capitulino1-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>
2010-08-22QMP: Update README fileLuiz Capitulino1-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>
2010-07-01QMP: Fix python helper /wrt long return stringsJan Kiszka1-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>
2010-07-01QMP: Teach basic capability negotiation to python exampleJan Kiszka2-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>
2010-06-13monitor/QMP: Drop info hpet / query-hpetJan Kiszka1-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>
2010-06-01QMP: Introduce commands documentationJan Kiszka1-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>
2010-05-19QMP: Add "Downstream extension of QMP" to specMarkus Armbruster1-0/+55
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2010-05-03QMP: Introduce RESUME eventLuiz Capitulino1-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>
2010-04-18QMP: Improve RTC_CHANGE event descriptionLuiz Capitulino1-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>
2010-03-09QMP: Introduce WATCHDOG eventLuiz Capitulino1-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>
2010-03-08QMP: Introduce RTC_CHANGE eventLuiz Capitulino1-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>
2010-03-08QMP: Revamp the qmp-events.txt fileLuiz Capitulino1-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>
2010-03-08QMP: Drop DEBUG eventLuiz Capitulino1-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>
2010-02-10QMP: spec: Capability negotiation updatesLuiz Capitulino1-17/+29
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-10QMP: Add QEMU's version to the greeting messageLuiz Capitulino2-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>
2010-02-10QMP: BLOCK_IO_ERROR event handlingLuiz Capitulino1-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>
2010-01-19QMP: Introduce VNC_INITIALIZED eventLuiz Capitulino1-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>
2010-01-19QMP: Introduce VNC_DISCONNECTED eventLuiz Capitulino1-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>
2010-01-19QMP: Introduce VNC_CONNECTED eventLuiz Capitulino1-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>
2009-12-19QMP: Update spec fileLuiz Capitulino1-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>
2009-12-19QMP: Update README fileLuiz Capitulino1-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>
2009-12-07QMP: add human-readable description to error responseMarkus Armbruster1-1/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03QMP: Introduce vm-infoLuiz Capitulino1-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>
2009-12-03QMP: Introduce qmp-shellLuiz Capitulino2-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>
2009-12-03QMP: Introduce qmp-events.txtLuiz Capitulino1-0/+26
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03QMP: Introduce specificationLuiz Capitulino1-0/+192
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03QMP: Introduce README fileLuiz Capitulino1-0/+51
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>