qapi: break long lines at 'data' member

Let's break the line before 'data'. While at it, improve a bit
indentation/spacing. (I removed some alignment which are not helping
much readability and become quickly inconsistent)

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181208111606.8505-26-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-12-08 15:16:04 +04:00 committed by Markus Armbruster
parent 5751686364
commit b0ddeba22a
7 changed files with 101 additions and 71 deletions

View File

@ -1143,8 +1143,10 @@
# This command is now obsolete and will always return an error since 2.10 # This command is now obsolete and will always return an error since 2.10
# #
## ##
{ 'command': 'block_passwd', 'data': {'*device': 'str', { 'command': 'block_passwd',
'*node-name': 'str', 'password': 'str'} } 'data': { '*device': 'str',
'*node-name': 'str',
'password': 'str' } }
## ##
# @block_resize: # @block_resize:
@ -1171,9 +1173,10 @@
# <- { "return": {} } # <- { "return": {} }
# #
## ##
{ 'command': 'block_resize', 'data': { '*device': 'str', { 'command': 'block_resize',
'*node-name': 'str', 'data': { '*device': 'str',
'size': 'int' }} '*node-name': 'str',
'size': 'int' } }
## ##
# @NewImageMode: # @NewImageMode:

View File

@ -25,9 +25,10 @@
# #
# Since: 0.14.0 # Since: 0.14.0
## ##
{ 'struct': 'ChardevInfo', 'data': {'label': 'str', { 'struct': 'ChardevInfo',
'filename': 'str', 'data': { 'label': 'str',
'frontend-open': 'bool'} } 'filename': 'str',
'frontend-open': 'bool' } }
## ##
# @query-chardev: # @query-chardev:
@ -152,7 +153,8 @@
# #
## ##
{ 'command': 'ringbuf-write', { 'command': 'ringbuf-write',
'data': {'device': 'str', 'data': 'str', 'data': { 'device': 'str',
'data': 'str',
'*format': 'DataFormat'} } '*format': 'DataFormat'} }
## ##
@ -202,8 +204,9 @@
# #
# Since: 2.6 # Since: 2.6
## ##
{ 'struct': 'ChardevCommon', 'data': { '*logfile': 'str', { 'struct': 'ChardevCommon',
'*logappend': 'bool' } } 'data': { '*logfile': 'str',
'*logappend': 'bool' } }
## ##
# @ChardevFile: # @ChardevFile:
@ -217,9 +220,10 @@
# #
# Since: 1.4 # Since: 1.4
## ##
{ 'struct': 'ChardevFile', 'data': { '*in' : 'str', { 'struct': 'ChardevFile',
'out' : 'str', 'data': { '*in': 'str',
'*append': 'bool' }, 'out': 'str',
'*append': 'bool' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -232,7 +236,8 @@
# #
# Since: 1.4 # Since: 1.4
## ##
{ 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' }, { 'struct': 'ChardevHostdev',
'data': { 'device': 'str' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -260,15 +265,16 @@
# #
# Since: 1.4 # Since: 1.4
## ##
{ 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy', { 'struct': 'ChardevSocket',
'*tls-creds' : 'str', 'data': { 'addr': 'SocketAddressLegacy',
'*server' : 'bool', '*tls-creds': 'str',
'*wait' : 'bool', '*server': 'bool',
'*nodelay' : 'bool', '*wait': 'bool',
'*telnet' : 'bool', '*nodelay': 'bool',
'*tn3270' : 'bool', '*telnet': 'bool',
'*websocket' : 'bool', '*tn3270': 'bool',
'*reconnect' : 'int' }, '*websocket': 'bool',
'*reconnect': 'int' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -281,8 +287,9 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy', { 'struct': 'ChardevUdp',
'*local' : 'SocketAddressLegacy' }, 'data': { 'remote': 'SocketAddressLegacy',
'*local': 'SocketAddressLegacy' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -294,7 +301,8 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' }, { 'struct': 'ChardevMux',
'data': { 'chardev': 'str' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -308,7 +316,8 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' }, { 'struct': 'ChardevStdio',
'data': { '*signal': 'bool' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
@ -321,7 +330,8 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' }, { 'struct': 'ChardevSpiceChannel',
'data': { 'type': 'str' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
# TODO: 'if': 'defined(CONFIG_SPICE)' # TODO: 'if': 'defined(CONFIG_SPICE)'
@ -334,7 +344,8 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' }, { 'struct': 'ChardevSpicePort',
'data': { 'fqdn': 'str' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
# TODO: 'if': 'defined(CONFIG_SPICE)' # TODO: 'if': 'defined(CONFIG_SPICE)'
@ -350,10 +361,11 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevVC', 'data': { '*width' : 'int', { 'struct': 'ChardevVC',
'*height' : 'int', 'data': { '*width': 'int',
'*cols' : 'int', '*height': 'int',
'*rows' : 'int' }, '*cols': 'int',
'*rows': 'int' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -365,7 +377,8 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' }, { 'struct': 'ChardevRingbuf',
'data': { '*size': 'int' },
'base': 'ChardevCommon' } 'base': 'ChardevCommon' }
## ##
@ -375,29 +388,30 @@
# #
# Since: 1.4 (testdev since 2.2, wctablet since 2.9) # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
## ##
{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile', { 'union': 'ChardevBackend',
'serial' : 'ChardevHostdev', 'data': { 'file': 'ChardevFile',
'parallel': 'ChardevHostdev', 'serial': 'ChardevHostdev',
'pipe' : 'ChardevHostdev', 'parallel': 'ChardevHostdev',
'socket' : 'ChardevSocket', 'pipe': 'ChardevHostdev',
'udp' : 'ChardevUdp', 'socket': 'ChardevSocket',
'pty' : 'ChardevCommon', 'udp': 'ChardevUdp',
'null' : 'ChardevCommon', 'pty': 'ChardevCommon',
'mux' : 'ChardevMux', 'null': 'ChardevCommon',
'msmouse': 'ChardevCommon', 'mux': 'ChardevMux',
'wctablet' : 'ChardevCommon', 'msmouse': 'ChardevCommon',
'braille': 'ChardevCommon', 'wctablet': 'ChardevCommon',
'testdev': 'ChardevCommon', 'braille': 'ChardevCommon',
'stdio' : 'ChardevStdio', 'testdev': 'ChardevCommon',
'console': 'ChardevCommon', 'stdio': 'ChardevStdio',
'spicevmc': 'ChardevSpiceChannel', 'console': 'ChardevCommon',
'spicevmc': 'ChardevSpiceChannel',
# TODO: { 'type': 'ChardevSpiceChannel', 'if': 'defined(CONFIG_SPICE)' }, # TODO: { 'type': 'ChardevSpiceChannel', 'if': 'defined(CONFIG_SPICE)' },
'spiceport': 'ChardevSpicePort', 'spiceport': 'ChardevSpicePort',
# TODO: { 'type': 'ChardevSpicePort', 'if': 'defined(CONFIG_SPICE)' }, # TODO: { 'type': 'ChardevSpicePort', 'if': 'defined(CONFIG_SPICE)' },
'vc' : 'ChardevVC', 'vc': 'ChardevVC',
'ringbuf': 'ChardevRingbuf', 'ringbuf': 'ChardevRingbuf',
# next one is just for compatibility # next one is just for compatibility
'memory' : 'ChardevRingbuf' } } 'memory': 'ChardevRingbuf' } }
## ##
# @ChardevReturn: # @ChardevReturn:
@ -409,7 +423,8 @@
# #
# Since: 1.4 # Since: 1.4
## ##
{ 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } } { 'struct' : 'ChardevReturn',
'data': { '*pty': 'str' } }
## ##
# @chardev-add: # @chardev-add:
@ -442,8 +457,9 @@
# <- { "return": { "pty" : "/dev/pty/42" } } # <- { "return": { "pty" : "/dev/pty/42" } }
# #
## ##
{ 'command': 'chardev-add', 'data': {'id' : 'str', { 'command': 'chardev-add',
'backend' : 'ChardevBackend' }, 'data': { 'id': 'str',
'backend': 'ChardevBackend' },
'returns': 'ChardevReturn' } 'returns': 'ChardevReturn' }
## ##
@ -482,8 +498,9 @@
# <- {"return": {}} # <- {"return": {}}
# #
## ##
{ 'command': 'chardev-change', 'data': {'id' : 'str', { 'command': 'chardev-change',
'backend' : 'ChardevBackend' }, 'data': { 'id': 'str',
'backend': 'ChardevBackend' },
'returns': 'ChardevReturn' } 'returns': 'ChardevReturn' }
## ##
@ -503,7 +520,8 @@
# <- { "return": {} } # <- { "return": {} }
# #
## ##
{ 'command': 'chardev-remove', 'data': {'id': 'str'} } { 'command': 'chardev-remove',
'data': { 'id': 'str' } }
## ##
# @chardev-send-break: # @chardev-send-break:
@ -522,7 +540,8 @@
# <- { "return": {} } # <- { "return": {} }
# #
## ##
{ 'command': 'chardev-send-break', 'data': {'id': 'str'} } { 'command': 'chardev-send-break',
'data': { 'id': 'str' } }
## ##
# @VSERPORT_CHANGE: # @VSERPORT_CHANGE:
@ -543,4 +562,5 @@
# #
## ##
{ 'event': 'VSERPORT_CHANGE', { 'event': 'VSERPORT_CHANGE',
'data': { 'id': 'str', 'open': 'bool' } } 'data': { 'id': 'str',
'open': 'bool' } }

View File

@ -1356,7 +1356,8 @@
# #
# Since: 3.0 # Since: 3.0
## ##
{ 'command': 'migrate-recover', 'data': { 'uri': 'str' }, { 'command': 'migrate-recover',
'data': { 'uri': 'str' },
'allow-oob': true } 'allow-oob': true }
## ##

View File

@ -2385,7 +2385,9 @@
# <- { "return": { "fdset-id": 1, "fd": 3 } } # <- { "return": { "fdset-id": 1, "fd": 3 } }
# #
## ##
{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, { 'command': 'add-fd',
'data': { '*fdset-id': 'int',
'*opaque': 'str' },
'returns': 'AddfdInfo' } 'returns': 'AddfdInfo' }
## ##
@ -2657,7 +2659,8 @@
# } # }
# #
## ##
{'command': 'query-command-line-options', 'data': { '*option': 'str' }, {'command': 'query-command-line-options',
'data': { '*option': 'str' },
'returns': ['CommandLineOptionInfo'], 'returns': ['CommandLineOptionInfo'],
'allow-preconfig': true } 'allow-preconfig': true }

View File

@ -657,7 +657,8 @@
# } # }
# #
## ##
{ 'command': 'query-rx-filter', 'data': { '*name': 'str' }, { 'command': 'query-rx-filter',
'data': { '*name': 'str' },
'returns': ['RxFilterInfo'] } 'returns': ['RxFilterInfo'] }
## ##

View File

@ -76,8 +76,9 @@
# #
# Since: 1.5 # Since: 1.5
## ##
{ 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str', { 'struct': 'TPMPassthroughOptions',
'*cancel-path' : 'str'} } 'data': { '*path': 'str',
'*cancel-path': 'str' } }
## ##
# @TPMEmulatorOptions: # @TPMEmulatorOptions:

View File

@ -598,7 +598,8 @@
# Notes: An empty password in this command will set the password to the empty # Notes: An empty password in this command will set the password to the empty
# string. Existing clients are unaffected by executing this command. # string. Existing clients are unaffected by executing this command.
## ##
{ 'command': 'change-vnc-password', 'data': {'password': 'str'}, { 'command': 'change-vnc-password',
'data': { 'password': 'str' },
'if': 'defined(CONFIG_VNC)' } 'if': 'defined(CONFIG_VNC)' }
## ##