From 5d07159d639603e31f570665946e0817da313302 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:31 +0200 Subject: [PATCH 01/10] qapi: fix example of query-ballon command Example output has an extra ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-2-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 6afd1936b0..5f1f50d3ed 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1074,7 +1074,7 @@ # # -> { "execute": "query-balloon" } # <- { "return": { -# "actual": 1073741824, +# "actual": 1073741824 # } # } # From 5be07b3e54b4eb9781fd0fb729e0ac7406499605 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:32 +0200 Subject: [PATCH 02/10] qapi: fix example of query-vnc command Example output has an extra ',' delimiter in member "websocket" and it lacks it in "family" member. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-3-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/ui.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index cf58ab4283..286c5731d1 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -667,8 +667,8 @@ # { # "host":"127.0.0.1", # "service":"50401", -# "family":"ipv4" -# "websocket":false, +# "family":"ipv4", +# "websocket":false # } # ] # } From 612fb7cd5492f7f421cbcbb6d6118ca7eef62c91 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:33 +0200 Subject: [PATCH 03/10] qapi: fix example of query-dump-guest-memory-capability command Example output is missing closing curly brackets. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-4-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/dump.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/dump.json b/qapi/dump.json index 90859c5483..6fc215dd47 100644 --- a/qapi/dump.json +++ b/qapi/dump.json @@ -195,7 +195,7 @@ # # -> { "execute": "query-dump-guest-memory-capability" } # <- { "return": { "formats": -# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } +# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } } # ## { 'command': 'query-dump-guest-memory-capability', From ccc9ddbcbe5a0a8d7d2881bf6b17324016fb994b Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:34 +0200 Subject: [PATCH 04/10] qapi: fix example of BLOCK_JOB_READY event Example output is missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-5-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 2173e7734a..882b266532 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -5252,7 +5252,7 @@ # # <- { "event": "BLOCK_JOB_READY", # "data": { "device": "drive0", "type": "mirror", "speed": 0, -# "len": 2097152, "offset": 2097152 } +# "len": 2097152, "offset": 2097152 }, # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } # ## From dac318d3dfebfb89e0266ad12df2792bb33c5210 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:35 +0200 Subject: [PATCH 05/10] qapi: fix example of NIC_RX_FILTER_CHANGED event Example output has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-6-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/net.json | 1 - 1 file changed, 1 deletion(-) diff --git a/qapi/net.json b/qapi/net.json index 75ba2cb989..dd088c09c5 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -757,7 +757,6 @@ # "data": { "name": "vnet0", # "path": "/machine/peripheral/vnet0/virtio-backend" }, # "timestamp": { "seconds": 1368697518, "microseconds": 326866 } } -# } # ## { 'event': 'NIC_RX_FILTER_CHANGED', From 0cd5a5e9c9f3255d76e52b6f8a3790ba4044ce2e Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:36 +0200 Subject: [PATCH 06/10] qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event Example output is missing a ',' delimiter and it has an extra ending curly bracket. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-7-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/qdev.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qapi/qdev.json b/qapi/qdev.json index 26cd10106b..2708fb4e99 100644 --- a/qapi/qdev.json +++ b/qapi/qdev.json @@ -150,10 +150,9 @@ # # Example: # -# <- { "event": "DEVICE_UNPLUG_GUEST_ERROR" +# <- { "event": "DEVICE_UNPLUG_GUEST_ERROR", # "data": { "device": "core1", # "path": "/machine/peripheral/core1" }, -# }, # "timestamp": { "seconds": 1615570772, "microseconds": 202844 } } # ## From e8796ac4b6f8a9f8d1d2c3c6a774d815d10d88c5 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:37 +0200 Subject: [PATCH 07/10] qapi: fix example of MEM_UNPLUG_ERROR event Example output was missing ',' delimiter. Fix it. Problem was noticed when trying to load the example into python's json library. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-8-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/machine.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5f1f50d3ed..4782eea2c3 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1416,7 +1416,7 @@ # # Example: # -# <- { "event": "MEM_UNPLUG_ERROR" +# <- { "event": "MEM_UNPLUG_ERROR", # "data": { "device": "dimm1", # "msg": "acpi: device unplug for unsupported device" # }, From b6522938327141235b97ab38e40c6c4512587373 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:38 +0200 Subject: [PATCH 08/10] qapi: fix examples of blockdev-add with qcow2 The examples use "qcow2" driver with the wrong member name for BlockdevRef alternate type. This patch changes all wrong member names from "file" to "data-file" which is the correct member name in BlockdevOptionsQcow2 for the BlockdevRef field. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-9-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/block-core.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 882b266532..f21fa235f2 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1541,8 +1541,8 @@ # -> { "execute": "blockdev-add", # "arguments": { "driver": "qcow2", # "node-name": "node1534", -# "file": { "driver": "file", -# "filename": "hd1.qcow2" }, +# "data-file": { "driver": "file", +# "filename": "hd1.qcow2" }, # "backing": null } } # # <- { "return": {} } @@ -4378,7 +4378,7 @@ # "arguments": { # "driver": "qcow2", # "node-name": "test1", -# "file": { +# "data-file": { # "driver": "file", # "filename": "test.qcow2" # } @@ -4395,7 +4395,7 @@ # "cache": { # "direct": true # }, -# "file": { +# "data-file": { # "driver": "file", # "filename": "/tmp/test.qcow2" # }, @@ -4477,7 +4477,7 @@ # "arguments": { # "driver": "qcow2", # "node-name": "node0", -# "file": { +# "data-file": { # "driver": "file", # "filename": "test.qcow2" # } From b4c32cbf06621117214f71501866514011434f43 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:39 +0200 Subject: [PATCH 09/10] qapi: fix example of query-hotpluggable-cpus command The example return type has the wrong member name. Fix it. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-10-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/machine.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 4782eea2c3..abb2f48808 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -958,9 +958,9 @@ # # -> { "execute": "query-hotpluggable-cpus" } # <- {"return": [ -# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", +# { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core", # "vcpus-count": 1 }, -# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", +# { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core", # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} # ]}' # From 6e7a37ffc230d06852f1a8893097331d39df77c9 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Thu, 1 Sep 2022 10:58:40 +0200 Subject: [PATCH 10/10] qapi: fix examples of events missing timestamp I've used real timestamp and changing them one by one so they would not be all equal. Problem was noticed when using the example as a test case for Go bindings. Signed-off-by: Victor Toso Message-Id: <20220901085840.22520-11-victortoso@redhat.com> Signed-off-by: Markus Armbruster --- qapi/migration.json | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 81185d4311..88ecf86ac8 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1995,16 +1995,23 @@ # } # <- { "return": { } } # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1432121972, "microseconds": 744001}, # "data": {"status": "created", "id": "snapsave0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1432122172, "microseconds": 744001}, # "data": {"status": "running", "id": "snapsave0"}} -# <- {"event": "STOP"} -# <- {"event": "RESUME"} +# <- {"event": "STOP", +# "timestamp": {"seconds": 1432122372, "microseconds": 744001} } +# <- {"event": "RESUME", +# "timestamp": {"seconds": 1432122572, "microseconds": 744001} } # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1432122772, "microseconds": 744001}, # "data": {"status": "waiting", "id": "snapsave0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1432122972, "microseconds": 744001}, # "data": {"status": "pending", "id": "snapsave0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1432123172, "microseconds": 744001}, # "data": {"status": "concluded", "id": "snapsave0"}} # -> {"execute": "query-jobs"} # <- {"return": [{"current-progress": 1, @@ -2056,16 +2063,23 @@ # } # <- { "return": { } } # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1472124172, "microseconds": 744001}, # "data": {"status": "created", "id": "snapload0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1472125172, "microseconds": 744001}, # "data": {"status": "running", "id": "snapload0"}} -# <- {"event": "STOP"} -# <- {"event": "RESUME"} +# <- {"event": "STOP", +# "timestamp": {"seconds": 1472125472, "microseconds": 744001} } +# <- {"event": "RESUME", +# "timestamp": {"seconds": 1472125872, "microseconds": 744001} } # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1472126172, "microseconds": 744001}, # "data": {"status": "waiting", "id": "snapload0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1472127172, "microseconds": 744001}, # "data": {"status": "pending", "id": "snapload0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1472128172, "microseconds": 744001}, # "data": {"status": "concluded", "id": "snapload0"}} # -> {"execute": "query-jobs"} # <- {"return": [{"current-progress": 1, @@ -2108,14 +2122,19 @@ # } # <- { "return": { } } # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1442124172, "microseconds": 744001}, # "data": {"status": "created", "id": "snapdelete0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1442125172, "microseconds": 744001}, # "data": {"status": "running", "id": "snapdelete0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1442126172, "microseconds": 744001}, # "data": {"status": "waiting", "id": "snapdelete0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1442127172, "microseconds": 744001}, # "data": {"status": "pending", "id": "snapdelete0"}} # <- {"event": "JOB_STATUS_CHANGE", +# "timestamp": {"seconds": 1442128172, "microseconds": 744001}, # "data": {"status": "concluded", "id": "snapdelete0"}} # -> {"execute": "query-jobs"} # <- {"return": [{"current-progress": 1,