All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] schemas: fix: wrong field name 'data' in client snapshot msg examples
@ 2022-02-22 14:14 Fabian Holler
  2022-02-22 15:02 ` Markus Armbruster
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Holler @ 2022-02-22 14:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fabian Holler, Eric Blake, Markus Armbruster,
	Dr. David Alan Gilbert, Juan Quintela

The examples for the snapshot-* commands documented that arguments for
the commands must be passed in a 'data' field.
This is wrong, passing them in a "data" field results in
the error:
  {"error": {"class": "GenericError", "desc": "QMP input member 'data'
		       is unexpected"}}

Arguments are expected to be passed in an field called "arguments".
Replace "data" with "arguments" in the snapshot-* command examples.

Signed-off-by: Fabian Holler <fabian.holler@simplesurance.de>
---
 qapi/migration.json | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qapi/migration.json b/qapi/migration.json
index 5975a0e104..1c6296897d 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1888,7 +1888,7 @@
 # Example:
 #
 # -> { "execute": "snapshot-save",
-#      "data": {
+#      "arguments": {
 #         "job-id": "snapsave0",
 #         "tag": "my-snap",
 #         "vmstate": "disk0",
@@ -1949,7 +1949,7 @@
 # Example:
 #
 # -> { "execute": "snapshot-load",
-#      "data": {
+#      "arguments": {
 #         "job-id": "snapload0",
 #         "tag": "my-snap",
 #         "vmstate": "disk0",
@@ -2002,7 +2002,7 @@
 # Example:
 #
 # -> { "execute": "snapshot-delete",
-#      "data": {
+#      "arguments": {
 #         "job-id": "snapdelete0",
 #         "tag": "my-snap",
 #         "devices": ["disk0", "disk1"]
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] schemas: fix: wrong field name 'data' in client snapshot msg examples
  2022-02-22 14:14 [PATCH] schemas: fix: wrong field name 'data' in client snapshot msg examples Fabian Holler
@ 2022-02-22 15:02 ` Markus Armbruster
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Armbruster @ 2022-02-22 15:02 UTC (permalink / raw)
  To: Fabian Holler
  Cc: Eric Blake, qemu-devel, Dr. David Alan Gilbert, Juan Quintela

Recommend to tweak the title to something like

    qapi/migration: Fix examples ...

Fabian Holler <fabian.holler@simplesurance.de> writes:

> The examples for the snapshot-* commands documented that arguments for

document

> the commands must be passed in a 'data' field.
> This is wrong, passing them in a "data" field results in
> the error:
>   {"error": {"class": "GenericError", "desc": "QMP input member 'data'
> 		       is unexpected"}}
>
> Arguments are expected to be passed in an field called "arguments".
> Replace "data" with "arguments" in the snapshot-* command examples.
>
> Signed-off-by: Fabian Holler <fabian.holler@simplesurance.de>
> ---
>  qapi/migration.json | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 5975a0e104..1c6296897d 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json

Please also fix this one:

   # Example:
   #   {"command": "calc-dirty-rate", "data": {"calc-time": 1,
   #                                           'sample-pages': 512} }
   #

> @@ -1888,7 +1888,7 @@
>  # Example:
>  #
>  # -> { "execute": "snapshot-save",
> -#      "data": {
> +#      "arguments": {
>  #         "job-id": "snapsave0",
>  #         "tag": "my-snap",
>  #         "vmstate": "disk0",
> @@ -1949,7 +1949,7 @@
>  # Example:
>  #
>  # -> { "execute": "snapshot-load",
> -#      "data": {
> +#      "arguments": {
>  #         "job-id": "snapload0",
>  #         "tag": "my-snap",
>  #         "vmstate": "disk0",
> @@ -2002,7 +2002,7 @@
>  # Example:
>  #
>  # -> { "execute": "snapshot-delete",
> -#      "data": {
> +#      "arguments": {
>  #         "job-id": "snapdelete0",
>  #         "tag": "my-snap",
>  #         "devices": ["disk0", "disk1"]

Good catch!



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-22 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 14:14 [PATCH] schemas: fix: wrong field name 'data' in client snapshot msg examples Fabian Holler
2022-02-22 15:02 ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.