Message ID | 1439279489-13338-2-git-send-email-wency@cn.fujitsu.com |
---|---|
State | New |
Headers | show |
On 08/11/2015 01:51 AM, Wen Congyang wrote: > It will be used by BlockdevOptionsNBD. > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> > Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> > Signed-off-by: Gonglei <arei.gonglei@huawei.com> > Reviewed-by: Alberto Garcia <berto@igalia.com> > --- > qapi-schema.json | 27 --------------------------- > qapi/common.json | 27 +++++++++++++++++++++++++++ > 2 files changed, 27 insertions(+), 27 deletions(-) > Reviewed-by: Eric Blake <eblake@redhat.com> > +++ b/qapi/common.json > @@ -114,3 +114,30 @@ > ## > { 'enum': 'OnOffAuto', > 'data': [ 'auto', 'on', 'off' ] } > + > +## > +# @InetSocketAddress > +# > +# Captures a socket address or address range in the Internet namespace. > +# > +# @host: host part of the address > +# > +# @port: port part of the address, or lowest port if @to is present > +# > +# @to: highest port to try > +# > +# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 > +# #optional > +# > +# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 > +# #optional > +# > +# Since 1.3 > +## > +{ 'struct': 'InetSocketAddress', > + 'data': { > + 'host': 'str', > + 'port': 'str', > + '*to': 'uint16', The fact that 'port' is sometimes textual, and sometimes an integer, is pre-existing, so moving it does not affect the validity of this patch. But I wonder if we should in the future add an 'alternate' type that allows us to directly pass an integer for 'port', rather than always having to pass a stringized integer.
diff --git a/qapi-schema.json b/qapi-schema.json index 4342a08..0ccb002 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2537,33 +2537,6 @@ 'opts': 'NetClientOptions' } } ## -# @InetSocketAddress -# -# Captures a socket address or address range in the Internet namespace. -# -# @host: host part of the address -# -# @port: port part of the address, or lowest port if @to is present -# -# @to: highest port to try -# -# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 -# #optional -# -# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 -# #optional -# -# Since 1.3 -## -{ 'struct': 'InetSocketAddress', - 'data': { - 'host': 'str', - 'port': 'str', - '*to': 'uint16', - '*ipv4': 'bool', - '*ipv6': 'bool' } } - -## # @UnixSocketAddress # # Captures a socket address in the local ("Unix socket") namespace. diff --git a/qapi/common.json b/qapi/common.json index bad56bf..11d039a 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -114,3 +114,30 @@ ## { 'enum': 'OnOffAuto', 'data': [ 'auto', 'on', 'off' ] } + +## +# @InetSocketAddress +# +# Captures a socket address or address range in the Internet namespace. +# +# @host: host part of the address +# +# @port: port part of the address, or lowest port if @to is present +# +# @to: highest port to try +# +# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 +# #optional +# +# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 +# #optional +# +# Since 1.3 +## +{ 'struct': 'InetSocketAddress', + 'data': { + 'host': 'str', + 'port': 'str', + '*to': 'uint16', + '*ipv4': 'bool', + '*ipv6': 'bool' } }