From a589569f2f40a0454b52398035cfe7fbe44ab1e9 Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:30 +0200 Subject: qapi: adjust existing defines In order to let event defines use existing types later, instead of redefine new ones, some old type defines for spice and vnc are changed, and BlockErrorAction is moved from block.h to qapi schema. Note that BlockErrorAction is not merged with BlockdevOnError. At this point, VncInfo is not made a child of VncBasicInfo, because VncBasicInfo has mandatory fields where VncInfo makes them optional. Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 110 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 25 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 98350048f6..4334e8ff33 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -630,21 +630,59 @@ { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } ## -# @VncClientInfo: +# @NetworkAddressFamily # -# Information about a connected VNC client. +# The network address family +# +# @ipv4: IPV4 family +# +# @ipv6: IPV6 family +# +# @unix: unix socket +# +# @unknown: otherwise +# +# Since: 2.1 +## +{ 'enum': 'NetworkAddressFamily', + 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] } + +## +# @VncBasicInfo # -# @host: The host name of the client. QEMU tries to resolve this to a DNS name -# when possible. +# The basic information for vnc network connection # -# @family: 'ipv6' if the client is connected via IPv6 and TCP -# 'ipv4' if the client is connected via IPv4 and TCP -# 'unix' if the client is connected via a unix domain socket -# 'unknown' otherwise +# @host: IP address +# +# @service: The service name of vnc port. This may depend on the host system's +# service database so symbolic names should not be relied on. +# +# @family: address family +# +# Since: 2.1 +## +{ 'type': 'VncBasicInfo', + 'data': { 'host': 'str', + 'service': 'str', + 'family': 'NetworkAddressFamily' } } + +## +# @VncServerInfo +# +# The network connection information for server +# +# @auth: #optional, authentication method +# +# Since: 2.1 +## +{ 'type': 'VncServerInfo', + 'base': 'VncBasicInfo', + 'data': { '*auth': 'str' } } + +## +# @VncClientInfo: # -# @service: The service name of the client's port. This may depends on the -# host system's service database so symbolic names should not be -# relied on. +# Information about a connected VNC client. # # @x509_dname: #optional If x509 authentication is in use, the Distinguished # Name of the client. @@ -655,8 +693,8 @@ # Since: 0.14.0 ## { 'type': 'VncClientInfo', - 'data': {'host': 'str', 'family': 'str', 'service': 'str', - '*x509_dname': 'str', '*sasl_username': 'str'} } + 'base': 'VncBasicInfo', + 'data': { '*x509_dname' : 'str', '*sasl_username': 'str' } } ## # @VncInfo: @@ -695,7 +733,8 @@ # Since: 0.14.0 ## { 'type': 'VncInfo', - 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str', + 'data': {'enabled': 'bool', '*host': 'str', + '*family': 'NetworkAddressFamily', '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } ## @@ -710,19 +749,40 @@ { 'command': 'query-vnc', 'returns': 'VncInfo' } ## -# @SpiceChannel +# @SpiceBasicInfo # -# Information about a SPICE client channel. +# The basic information for SPICE network connection +# +# @host: IP address +# +# @port: port number +# +# @family: address family +# +# Since: 2.1 +## +{ 'type': 'SpiceBasicInfo', + 'data': { 'host': 'str', + 'port': 'str', + 'family': 'NetworkAddressFamily' } } + +## +# @SpiceServerInfo # -# @host: The host name of the client. QEMU tries to resolve this to a DNS name -# when possible. +# Information about a SPICE server # -# @family: 'ipv6' if the client is connected via IPv6 and TCP -# 'ipv4' if the client is connected via IPv4 and TCP -# 'unix' if the client is connected via a unix domain socket -# 'unknown' otherwise +# @auth: #optional, authentication method # -# @port: The client's port number. +# Since: 2.1 +## +{ 'type': 'SpiceServerInfo', + 'base': 'SpiceBasicInfo', + 'data': { '*auth': 'str' } } + +## +# @SpiceChannel +# +# Information about a SPICE client channel. # # @connection-id: SPICE connection id number. All channels with the same id # belong to the same SPICE session. @@ -740,8 +800,8 @@ # Since: 0.14.0 ## { 'type': 'SpiceChannel', - 'data': {'host': 'str', 'family': 'str', 'port': 'str', - 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', + 'base': 'SpiceBasicInfo', + 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', 'tls': 'bool'} } ## -- cgit v1.2.3 From f668470f403e83cc4622b1b4e563e2c61fbdfe62 Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:32 +0200 Subject: qapi: add new schema file qapi-event.json Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 4334e8ff33..e8c55e21a4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3346,3 +3346,5 @@ # Since: 2.1 ## { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } + +{ 'include': 'qapi-event.json' } -- cgit v1.2.3 From 99eaf09c73b213e32e297b1d08d035abb5b268e9 Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:42 +0200 Subject: qapi event: convert WATCHDOG Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index e8c55e21a4..0bf5894f7e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3347,4 +3347,28 @@ ## { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } +## +# @WatchdogExpirationAction +# +# An enumeration of the actions taken when the watchdog device's timer is +# expired +# +# @reset: system resets +# +# @shutdown: system shutdown, note that it is similar to @powerdown, which +# tries to set to system status and notify guest +# +# @poweroff: system poweroff, the emulator program exits +# +# @pause: system pauses, similar to @stop +# +# @debug: system enters debug state +# +# @none: nothing is done +# +# Since: 2.1 +## +{ 'enum': 'WatchdogExpirationAction', + 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] } + { 'include': 'qapi-event.json' } -- cgit v1.2.3 From 5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:45 +0200 Subject: qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 0bf5894f7e..a8de08c0a4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3371,4 +3371,18 @@ { 'enum': 'WatchdogExpirationAction', 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] } +## +# @IoOperationType +# +# An enumeration of the I/O operation types +# +# @read: read operation +# +# @write: write operation +# +# Since: 2.1 +## +{ 'enum': 'IoOperationType', + 'data': [ 'read', 'write' ] } + { 'include': 'qapi-event.json' } -- cgit v1.2.3 From 3a4496903795e05c1e8367bb4c9862d5670f48d7 Mon Sep 17 00:00:00 2001 From: Wenchao Xia Date: Wed, 18 Jun 2014 08:43:52 +0200 Subject: qapi event: convert GUEST_PANICKED 'monitor.h' is still included in target-s390x/kvm.c, since I have no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index a8de08c0a4..cf3e21a2ab 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3385,4 +3385,16 @@ { 'enum': 'IoOperationType', 'data': [ 'read', 'write' ] } +## +# @GuestPanicAction +# +# An enumeration of the actions taken when guest OS panic is detected +# +# @pause: system pauses +# +# Since: 2.1 +## +{ 'enum': 'GuestPanicAction', + 'data': [ 'pause' ] } + { 'include': 'qapi-event.json' } -- cgit v1.2.3