diff mbox series

[08/14] qapi: fix example of FAILOVER_NEGOTIATED event

Message ID 20220324175015.232794-9-victortoso@redhat.com (mailing list archive)
State New, archived
Headers show
Series Fix some qapi examples and a TODO section | expand

Commit Message

Victor Toso March 24, 2022, 5:50 p.m. UTC
* Data is an object, not a string. It generates a qdict.
* Timestamp is not optional, let's add for completeness.

Signed-off-by: Victor Toso <victortoso@redhat.com>
---
 qapi/net.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

John Snow March 24, 2022, 9:05 p.m. UTC | #1
On Thu, Mar 24, 2022 at 1:50 PM Victor Toso <victortoso@redhat.com> wrote:
>
> * Data is an object, not a string. It generates a qdict.
> * Timestamp is not optional, let's add for completeness.
>
> Signed-off-by: Victor Toso <victortoso@redhat.com>
> ---
>  qapi/net.json | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/net.json b/qapi/net.json
> index 7fab2e7cd8..82c0d9e778 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -691,7 +691,8 @@
>  # Example:
>  #
>  # <- { "event": "FAILOVER_NEGOTIATED",
> -#      "data": "net1" }
> +#      "data": { "device-id": "net1" },
> +#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
>  #
>  ##
>  { 'event': 'FAILOVER_NEGOTIATED',
> --
> 2.35.1
>

Oh, this one is all messed up to hell. We're not documenting the
device-id properly, either. Can that be fixed as well?

Your patch ain't wrong, though:

Reviewed-by: John Snow <jsnow@redhat.com>
diff mbox series

Patch

diff --git a/qapi/net.json b/qapi/net.json
index 7fab2e7cd8..82c0d9e778 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -691,7 +691,8 @@ 
 # Example:
 #
 # <- { "event": "FAILOVER_NEGOTIATED",
-#      "data": "net1" }
+#      "data": { "device-id": "net1" },
+#      "timestamp": { "seconds": 1368697518, "microseconds": 326866 } }
 #
 ##
 { 'event': 'FAILOVER_NEGOTIATED',