From patchwork Thu Feb 25 15:07:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 46246 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 24F4FB7C33 for ; Fri, 26 Feb 2010 02:18:49 +1100 (EST) Received: from localhost ([127.0.0.1]:34124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkfUD-0007vK-ND for incoming@patchwork.ozlabs.org; Thu, 25 Feb 2010 10:18:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkfJP-0003dp-Ua for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:36 -0500 Received: from [199.232.76.173] (port=38083 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkfJP-0003dN-71 for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:35 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkfJN-0008Rt-H1 for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55865) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkfJN-0008Rl-1e for qemu-devel@nongnu.org; Thu, 25 Feb 2010 10:07:33 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1PF7VDD016163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Feb 2010 10:07:32 -0500 Received: from localhost (vpn-9-86.rdu.redhat.com [10.11.9.86]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1PF7U7a031148 for ; Thu, 25 Feb 2010 10:07:31 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Thu, 25 Feb 2010 12:07:02 -0300 Message-Id: <1267110422-25873-6-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1267110422-25873-1-git-send-email-lcapitulino@redhat.com> References: <1267110422-25873-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 5/5] QMP: Revamp the qmp-events.txt file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- QMP/qmp-events.txt | 170 ++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 133 insertions(+), 37 deletions(-) diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index 9bf14d0..5ab5750 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -1,60 +1,156 @@ - QEMU Monitor Protocol: Events - ============================= + QEMU Monitor Protocol Events + ============================ -1 SHUTDOWN ------------ +BLOCK_IO_ERROR +-------------- + +Emitted when a disk I/O error occurs. + +Data: + +- "device": device name (json-string) +- "operation": I/O operation (json-string, "read" or "write") +- "action": action that has been taken, it's one of the following (json-string): + "ignore": error has been ignored + "report": error has been reported to the device + "stop": error caused VM to be stopped + +Example: + +{ "event": "BLOCK_IO_ERROR", + "data": { "device": "ide0-hd1", + "operation": "write", + "action": "stop" }, + "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } + +Note: If action is "stop", a STOP event will eventually follow the +BLOCK_IO_ERROR event. + +RESET +----- + +Emitted when the Virtual Machine is reseted. -Description: Issued when the Virtual Machine is powered down. Data: None. -2 RESET -------- +Example: + +{ "event": "RESET", + "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } + +SHUTDOWN +-------- + +Emitted when the Virtual Machine is powered down. -Description: Issued when the Virtual Machine is reseted. Data: None. -3 STOP ------- +Example: + +{ "event": "SHUTDOWN", + "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } + +Note: If the command-line option "-no-shutdown" has been specified, a STOP +event will eventually follow the SHUTDOWN event. + +STOP +---- + +Emitted when the Virtual Machine is stopped. -Description: Issued when the Virtual Machine is stopped. Data: None. -4 VNC_CONNECTED ---------------- +Example: -Description: Issued when a VNC client establishes a connection. -Data: 'server' and 'client' keys with the same keys as 'query-vnc', -except that authentication ID is not provided. +{ "event": "SHUTDOWN", + "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } -5 VNC_DISCONNECTED ------------------- +VNC_CONNECTED +------------- -Description: Issued when the conection is closed. -Data: 'server' and 'client' keys with the same keys as 'query-vnc'. +Emitted when a VNC client establishes a connection. + +Data: + +- "server": Server information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + - "auth": authentication method (json-string, optional) +- "client": Client information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + +Example: -6 VNC_INITIALIZED ------------------ +{ "event": "VNC_CONNECTED", + "data": { + "server": { "auth": "sasl", "family": "ipv4", + "service": "5901", "host": "0.0.0.0" }, + "client": { "family": "ipv4", "service": "58425", + "host": "127.0.0.1" } }, + "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } -Description: Issued when the VNC session is made active. -Data: 'server' and 'client' keys with the same keys as 'query-vnc'. -7 BLOCK_IO_ERROR +Note: This event is emitted before any authentication takes place, thus +the authentication ID is not provided. + +VNC_DISCONNECTED ---------------- -Description: Issued when a disk I/O error occurs +Emitted when the conection is closed. + Data: -- 'device': device name (json-string) -- 'operation': I/O operation (json-string, "read" or "write") -- 'action': action that has been taken, it's one of the following: - "ignore": error has been ignored - "report": error has been reported to the device - "stop": error caused VM to be stopped +- "server": Server information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + - "auth": authentication method (json-string, optional) +- "client": Client information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + - "x509_dname": TLS dname (json-string, optional) + - "sasl_username": SASL username (json-string, optional) Example: -{ "event": "BLOCK_IO_ERROR", - "data": { "device": "ide0-hd1", - "operation": "write", - "action": "stop" }, - "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } +{ "event": "VNC_DISCONNECTED", + "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": "luiz" } }, + "timestamp": { "seconds": 1262976601, "microseconds": 975795 } } + +VNC_INITIALIZED +--------------- + +Emitted after authentication takes place (if any) and the VNC session is +made active. + +Data: + +- "server": Server information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + - "auth": authentication method (json-string, optional) +- "client": Client information (json-object) + - "host": IP address (json-string) + - "service": port number (json-string) + - "family": address family (json-string, "ipv4" or "ipv6") + - "x509_dname": TLS dname (json-string, optional) + - "sasl_username": SASL username (json-string, optional) + +Example: + +{ "event": "VNC_INITIALIZED", + "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": "luiz" } }, + "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }