qapi-schema: SocketAddressFlat variants 'vsock' and 'fd'

Note that the new variants are impossible in qemu_gluster_glfs_init(),
because the gconf->server can only come from qemu_gluster_parse_uri()
or qemu_gluster_parse_json(), and neither can create anything but
'inet' or 'unix'.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1490895797-29094-7-git-send-email-armbru@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Markus Armbruster 2017-03-30 19:43:14 +02:00 committed by Max Reitz
parent fce5d5386d
commit 8bc0673f6d
2 changed files with 10 additions and 11 deletions

View File

@ -429,6 +429,8 @@ static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf,
server->value->u.inet.host, server->value->u.inet.host,
(int)port); (int)port);
break; break;
case SOCKET_ADDRESS_FLAT_TYPE_VSOCK:
case SOCKET_ADDRESS_FLAT_TYPE_FD:
default: default:
abort(); abort();
} }

View File

@ -4144,7 +4144,7 @@
# Since: 2.9 # Since: 2.9
## ##
{ 'enum': 'SocketAddressFlatType', { 'enum': 'SocketAddressFlatType',
'data': [ 'unix', 'inet' ] } 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
## ##
# @SocketAddressFlat: # @SocketAddressFlat:
@ -4153,22 +4153,19 @@
# #
# @type: Transport type # @type: Transport type
# #
# This is similar to SocketAddress, only distinction: # This is just like SocketAddress, except it's a flat union rather
# # than a simple union. Nicer because it avoids nesting on the wire,
# 1. SocketAddressFlat is a flat union, SocketAddress is a simple union. # i.e. this form has fewer {}.
# A flat union is nicer than simple because it avoids nesting
# (i.e. more {}) on the wire.
#
# 2. SocketAddressFlat supports only types 'unix' and 'inet', because
# that's what its current users need.
# #
# Since: 2.9 # Since: 2.9
## ##
{ 'union': 'SocketAddressFlat', { 'union': 'SocketAddressFlat',
'base': { 'type': 'SocketAddressFlatType' }, 'base': { 'type': 'SocketAddressFlatType' },
'discriminator': 'type', 'discriminator': 'type',
'data': { 'unix': 'UnixSocketAddress', 'data': { 'inet': 'InetSocketAddress',
'inet': 'InetSocketAddress' } } 'unix': 'UnixSocketAddress',
'vsock': 'VsockSocketAddress',
'fd': 'String' } }
## ##
# @getfd: # @getfd: