[PATCH v1 1/9] qapi: fix example of netdev_add command

Victor Toso posted 9 patches 3 years, 10 months ago
Maintainers: Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Jason Wang <jasowang@redhat.com>, Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
[PATCH v1 1/9] qapi: fix example of netdev_add command
Posted by Victor Toso 3 years, 10 months ago
Example output has the optional member @dnssearch as string type. It
should be an array of strings instead. Fix it.

For reference, see NetdevUserOptions.

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

diff --git a/qapi/net.json b/qapi/net.json
index 0d4578bd07..efc0bae170 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -51,7 +51,7 @@
 #
 # -> { "execute": "netdev_add",
 #      "arguments": { "type": "user", "id": "netdev1",
-#                     "dnssearch": "example.org" } }
+#                     "dnssearch": [ "example.org" ] } }
 # <- { "return": {} }
 #
 ##
-- 
2.35.1
Re: [PATCH v1 1/9] qapi: fix example of netdev_add command
Posted by Markus Armbruster 3 years, 10 months ago
Victor Toso <victortoso@redhat.com> writes:

> Example output has the optional member @dnssearch as string type. It
> should be an array of strings instead. Fix it.
>
> For reference, see NetdevUserOptions.
>
> Signed-off-by: Victor Toso <victortoso@redhat.com>
> ---
>  qapi/net.json | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qapi/net.json b/qapi/net.json
> index 0d4578bd07..efc0bae170 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -51,7 +51,7 @@
>  #
>  # -> { "execute": "netdev_add",
>  #      "arguments": { "type": "user", "id": "netdev1",
> -#                     "dnssearch": "example.org" } }
> +#                     "dnssearch": [ "example.org" ] } }
>  # <- { "return": {} }
>  #
>  ##

Uh, @dnssearch is ['String']...  shouldn't this be something like

   #                     "dnssearch": [ { "str": "example.org" } ] } }

?
Re: [PATCH v1 1/9] qapi: fix example of netdev_add command
Posted by Victor Toso 3 years, 10 months ago
Hi,

On Fri, Apr 01, 2022 at 09:56:40AM +0200, Markus Armbruster wrote:
> Victor Toso <victortoso@redhat.com> writes:
> 
> > Example output has the optional member @dnssearch as string type. It
> > should be an array of strings instead. Fix it.
> >
> > For reference, see NetdevUserOptions.
> >
> > Signed-off-by: Victor Toso <victortoso@redhat.com>
> > ---
> >  qapi/net.json | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/qapi/net.json b/qapi/net.json
> > index 0d4578bd07..efc0bae170 100644
> > --- a/qapi/net.json
> > +++ b/qapi/net.json
> > @@ -51,7 +51,7 @@
> >  #
> >  # -> { "execute": "netdev_add",
> >  #      "arguments": { "type": "user", "id": "netdev1",
> > -#                     "dnssearch": "example.org" } }
> > +#                     "dnssearch": [ "example.org" ] } }
> >  # <- { "return": {} }
> >  #
> >  ##
> 
> Uh, @dnssearch is ['String']...  shouldn't this be something like
> 
>    #                     "dnssearch": [ { "str": "example.org" } ] } }
> 
> ?

Yes, my mistake. Thanks for spotting it.
I'll resend this patch shortly.

Cheers,
Victor
[PATCH v1.1 1/9] qapi: fix example of netdev_add command
Posted by Victor Toso 3 years, 10 months ago
Example output has the optional member @dnssearch as string type. It
should be an array of strings instead. Fix it.

For reference, see NetdevUserOptions.

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

diff --git a/qapi/net.json b/qapi/net.json
index 0d4578bd07..b92f3f5fb4 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -51,7 +51,7 @@
 #
 # -> { "execute": "netdev_add",
 #      "arguments": { "type": "user", "id": "netdev1",
-#                     "dnssearch": "example.org" } }
+#                     "dnssearch": [ { "str": "example.org" } ] } }
 # <- { "return": {} }
 #
 ##
-- 
2.35.1
Re: [PATCH v1.1 1/9] qapi: fix example of netdev_add command
Posted by Markus Armbruster 3 years, 10 months ago
Victor Toso <victortoso@redhat.com> writes:

> Example output has the optional member @dnssearch as string type. It
> should be an array of strings instead. Fix it.

"of String objects".  Happy to fix this in my tree.

>
> For reference, see NetdevUserOptions.
>
> Signed-off-by: Victor Toso <victortoso@redhat.com>
> ---
>  qapi/net.json | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qapi/net.json b/qapi/net.json
> index 0d4578bd07..b92f3f5fb4 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -51,7 +51,7 @@
>  #
>  # -> { "execute": "netdev_add",
>  #      "arguments": { "type": "user", "id": "netdev1",
> -#                     "dnssearch": "example.org" } }
> +#                     "dnssearch": [ { "str": "example.org" } ] } }
>  # <- { "return": {} }
>  #
>  ##

Preferably with the commit message tweak:
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Re: [PATCH v1.1 1/9] qapi: fix example of netdev_add command
Posted by Victor Toso 3 years, 10 months ago
Hi,

On Mon, Apr 04, 2022 at 08:14:11AM +0200, Markus Armbruster wrote:
> Victor Toso <victortoso@redhat.com> writes:
> 
> > Example output has the optional member @dnssearch as string type. It
> > should be an array of strings instead. Fix it.
> 
> "of String objects".  Happy to fix this in my tree.

Sure

> 
> >
> > For reference, see NetdevUserOptions.
> >
> > Signed-off-by: Victor Toso <victortoso@redhat.com>
> > ---
> >  qapi/net.json | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/qapi/net.json b/qapi/net.json
> > index 0d4578bd07..b92f3f5fb4 100644
> > --- a/qapi/net.json
> > +++ b/qapi/net.json
> > @@ -51,7 +51,7 @@
> >  #
> >  # -> { "execute": "netdev_add",
> >  #      "arguments": { "type": "user", "id": "netdev1",
> > -#                     "dnssearch": "example.org" } }
> > +#                     "dnssearch": [ { "str": "example.org" } ] } }
> >  # <- { "return": {} }
> >  #
> >  ##
> 
> Preferably with the commit message tweak:
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Thanks,
Victor