diff mbox series

[06/14] qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event

Message ID 20220324175015.232794-7-victortoso@redhat.com
State New
Headers show
Series Fix some qapi examples and a TODO section | expand

Commit Message

Victor Toso March 24, 2022, 5:50 p.m. UTC
* qom-path is not optional

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

Comments

John Snow March 24, 2022, 8:57 p.m. UTC | #1
On Thu, Mar 24, 2022 at 1:50 PM Victor Toso <victortoso@redhat.com> wrote:
>
> * qom-path is not optional
>
> Signed-off-by: Victor Toso <victortoso@redhat.com>
> ---
>  qapi/machine.json | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 42fc68403d..9c460ec450 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1356,7 +1356,8 @@
>  # Example:
>  #
>  # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
> -#      "data": { "id": "vm0", "size": 1073741824},
> +#      "data": { "id": "vm0", "size": 1073741824,
> +#                "qom-path": "/machine/unattached/device[2]" },
>  #      "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
>  #
>  ##
> --
> 2.35.1
>

I'll just assume this is a realistic qom-path and not actually try to check 😅

Reviewed-by: John Snow <jsnow@redhat.com>
Markus Armbruster March 25, 2022, 1 p.m. UTC | #2
John Snow <jsnow@redhat.com> writes:

> On Thu, Mar 24, 2022 at 1:50 PM Victor Toso <victortoso@redhat.com> wrote:
>>
>> * qom-path is not optional

List of one item.  Recommend to scratch '* '.  Slightly less terse, like
"Event data member @qom-path is not optional" wouldn't hurt.

>>
>> Signed-off-by: Victor Toso <victortoso@redhat.com>
>> ---
>>  qapi/machine.json | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/qapi/machine.json b/qapi/machine.json
>> index 42fc68403d..9c460ec450 100644
>> --- a/qapi/machine.json
>> +++ b/qapi/machine.json
>> @@ -1356,7 +1356,8 @@
>>  # Example:
>>  #
>>  # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
>> -#      "data": { "id": "vm0", "size": 1073741824},
>> +#      "data": { "id": "vm0", "size": 1073741824,
>> +#                "qom-path": "/machine/unattached/device[2]" },
>>  #      "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
>>  #
>>  ##
>> --
>> 2.35.1
>>
>
> I'll just assume this is a realistic qom-path and not actually try to check 😅

I suppose a machine could exist where this path leads to a suitable
device.

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

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Victor Toso March 25, 2022, 9:03 p.m. UTC | #3
On Thu, Mar 24, 2022 at 04:57:00PM -0400, John Snow wrote:
> On Thu, Mar 24, 2022 at 1:50 PM Victor Toso <victortoso@redhat.com> wrote:
> >
> > * qom-path is not optional
> >
> > Signed-off-by: Victor Toso <victortoso@redhat.com>
> > ---
> >  qapi/machine.json | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/qapi/machine.json b/qapi/machine.json
> > index 42fc68403d..9c460ec450 100644
> > --- a/qapi/machine.json
> > +++ b/qapi/machine.json
> > @@ -1356,7 +1356,8 @@
> >  # Example:
> >  #
> >  # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
> > -#      "data": { "id": "vm0", "size": 1073741824},
> > +#      "data": { "id": "vm0", "size": 1073741824,
> > +#                "qom-path": "/machine/unattached/device[2]" },
> >  #      "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
> >  #
> >  ##
> > --
> > 2.35.1
> >
> 
> I'll just assume this is a realistic qom-path and not actually try to check 😅

Copied from another example, so blame that one if it doesn't!

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

Cheers,
diff mbox series

Patch

diff --git a/qapi/machine.json b/qapi/machine.json
index 42fc68403d..9c460ec450 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1356,7 +1356,8 @@ 
 # Example:
 #
 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
-#      "data": { "id": "vm0", "size": 1073741824},
+#      "data": { "id": "vm0", "size": 1073741824,
+#                "qom-path": "/machine/unattached/device[2]" },
 #      "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
 #
 ##