diff options
author | Eric Blake <eblake@redhat.com> | 2015-05-04 09:05:27 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-05-05 18:39:01 +0200 |
commit | 895a2a80e0e054f0d5d3715aa93d10d15e49f9f7 (patch) | |
tree | 0edff3d6c1e8261fcb43826537120cc8e297ec95 /qga/qapi-schema.json | |
parent | 3b2a8b85322f3677525a65c0b35deadf45fb704b (diff) |
qapi: Use 'struct' instead of 'type' in schema
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. Do the bulk of
the conversion to "struct" in qapi schema, with a fairly
mechanical:
for f in `find -name '*.json'; do sed -i "s/'type'/'struct'/"; done
followed by manually filtering out the places where we have a
'type' embedded in 'data'. Then tweak a couple of tests whose
output changes slightly due to longer lines.
I also verified that the generated files for QMP and QGA (such
as qmp-commands.h) are the same before and after, as assurance
that I didn't leave in any accidental member name changes.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qga/qapi-schema.json')
-rw-r--r-- | qga/qapi-schema.json | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index fecc4427d5..b446dc729d 100644 --- a/qga/qapi-schema.json +++ b/qga/qapi-schema.json @@ -150,7 +150,7 @@ # # Since 1.1.0 ## -{ 'type': 'GuestAgentCommandInfo', +{ 'struct': 'GuestAgentCommandInfo', 'data': { 'name': 'str', 'enabled': 'bool', 'success-response': 'bool' } } ## @@ -164,7 +164,7 @@ # # Since 0.15.0 ## -{ 'type': 'GuestAgentInfo', +{ 'struct': 'GuestAgentInfo', 'data': { 'version': 'str', 'supported_commands': ['GuestAgentCommandInfo'] } } ## @@ -242,7 +242,7 @@ # # Since: 0.15.0 ## -{ 'type': 'GuestFileRead', +{ 'struct': 'GuestFileRead', 'data': { 'count': 'int', 'buf-b64': 'str', 'eof': 'bool' } } ## @@ -274,7 +274,7 @@ # # Since: 0.15.0 ## -{ 'type': 'GuestFileWrite', +{ 'struct': 'GuestFileWrite', 'data': { 'count': 'int', 'eof': 'bool' } } ## @@ -309,7 +309,7 @@ # # Since: 0.15.0 ## -{ 'type': 'GuestFileSeek', +{ 'struct': 'GuestFileSeek', 'data': { 'position': 'int', 'eof': 'bool' } } ## @@ -556,7 +556,7 @@ # # Since: 1.1 ## -{ 'type': 'GuestIpAddress', +{ 'struct': 'GuestIpAddress', 'data': {'ip-address': 'str', 'ip-address-type': 'GuestIpAddressType', 'prefix': 'int'} } @@ -572,7 +572,7 @@ # # Since: 1.1 ## -{ 'type': 'GuestNetworkInterface', +{ 'struct': 'GuestNetworkInterface', 'data': {'name': 'str', '*hardware-address': 'str', '*ip-addresses': ['GuestIpAddress'] } } @@ -604,7 +604,7 @@ # # Since: 1.5 ## -{ 'type': 'GuestLogicalProcessor', +{ 'struct': 'GuestLogicalProcessor', 'data': {'logical-id': 'int', 'online': 'bool', '*can-offline': 'bool'} } @@ -694,7 +694,7 @@ # # Since: 2.2 ## -{ 'type': 'GuestPCIAddress', +{ 'struct': 'GuestPCIAddress', 'data': {'domain': 'int', 'bus': 'int', 'slot': 'int', 'function': 'int'} } @@ -709,7 +709,7 @@ # # Since: 2.2 ## -{ 'type': 'GuestDiskAddress', +{ 'struct': 'GuestDiskAddress', 'data': {'pci-controller': 'GuestPCIAddress', 'bus-type': 'GuestDiskBusType', 'bus': 'int', 'target': 'int', 'unit': 'int'} } @@ -725,7 +725,7 @@ # # Since: 2.2 ## -{ 'type': 'GuestFilesystemInfo', +{ 'struct': 'GuestFilesystemInfo', 'data': {'name': 'str', 'mountpoint': 'str', 'type': 'str', 'disk': ['GuestDiskAddress']} } @@ -782,7 +782,7 @@ # # Since: 2.3 ## -{ 'type': 'GuestMemoryBlock', +{ 'struct': 'GuestMemoryBlock', 'data': {'phys-index': 'uint64', 'online': 'bool', '*can-offline': 'bool'} } @@ -835,7 +835,7 @@ # # Since: 2.3 ## -{ 'type': 'GuestMemoryBlockResponse', +{ 'struct': 'GuestMemoryBlockResponse', 'data': { 'phys-index': 'uint64', 'response': 'GuestMemoryBlockResponseType', '*error-code': 'int' }} @@ -876,7 +876,7 @@ # # Since: 2.3 ## -{ 'type': 'GuestMemoryBlockInfo', +{ 'struct': 'GuestMemoryBlockInfo', 'data': {'size': 'uint64'} } ## |