diff mbox series

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

Message ID 20220331190633.121077-2-victortoso@redhat.com (mailing list archive)
State New, archived
Headers show
Series Fix some qapi examples | expand

Commit Message

Victor Toso March 31, 2022, 7:06 p.m. UTC
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(-)

Comments

Markus Armbruster April 1, 2022, 7:56 a.m. UTC | #1
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" } ] } }

?
Victor Toso April 1, 2022, 10:59 a.m. UTC | #2
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
diff mbox series

Patch

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": {} }
 #
 ##