All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Niteesh G. S." <niteesh.gs@gmail.com>
Cc: kwolf@redhat.com, vsementsov@virtuozzo.com, ehabkost@redhat.com,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	armbru@redhat.com, wainersm@redhat.com, qemu-devel@nongnu.org,
	"John Snow" <jsnow@redhat.com>
Subject: Re: RFC: Implementation of QMP documentation retrieval command
Date: Tue, 22 Jun 2021 10:35:47 +0100	[thread overview]
Message-ID: <YNGu80s+NHMGw6jf@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAN6ztm8bjVnFf_X-vEzYOmTdw09bcoQSkVH9h6BdPFr-PEsP_A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]

On Mon, Jun 21, 2021 at 11:56:30PM +0530, Niteesh G. S. wrote:
> TLDR: The goal of this mail wasn't to review the dummy command I had posted
> but
> rather start a discussion regarding the implementation of the QMP
> documentation
> retrieval command for the TUI.

It's not clear to me what exactly you wanted to discuss. Here is the QMP
schema from the commit you linked. It's something concrete that we can
discuss:

  ##
  # @CommandDocumentation:
  #
  # A object representing documentation for a command.
  #
  # @name: Command name
  #
  # @doc: A string containing the documentation.

Is @doc in some kind of markup or plain text?

  #
  ##
  { 'struct': 'CommandDocumentation',
    'data': {'name': 'str', 'doc': 'str'} }

  ##
  # @query-cmd-doc:
  #
  # (A simple *prototype* implementation)
  # Command query-cmd-doc will return the documentation for the command
  # specified. This will help QMP clients currently the AQMP TUI to show
  # documentation related to a specific command.
  #
  # @command-name: The command name to query documentation for
  #
  # Returns: A @CommandDocumentation object containing the documentation.
  #
  # Since: TODO: Add a number
  ##
  { 'command': 'query-cmd-doc',
    'data': { 'command-name': 'str' },
    'returns': 'CommandDocumentation' }

Is there a way to retrieve struct/enum/etc documentation?

Do you see a need to query multiple items of documentation in a single
command? A single item query command can become a performance bottleneck
if the clients wants to query the documentation for all commands, for
example. This can be solved by making the the return value an array and
allowing multiple commands to be queried at once.

Do you see a need for wildcard queries where the client does not have
the full command name? I guess the client has enough auto-completion
information to search all commands on the client side, so maybe this
functionality isn't necessary here?

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-06-22  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 15:48 RFC: Implementation of QMP documentation retrieval command Niteesh G. S.
2021-06-21 14:58 ` Philippe Mathieu-Daudé
2021-06-21 18:26   ` Niteesh G. S.
2021-06-22  9:35     ` Stefan Hajnoczi [this message]
2021-06-22 10:26       ` Daniel P. Berrangé
2021-06-22 11:04         ` Vladimir Sementsov-Ogievskiy
2021-06-22 18:57       ` Niteesh G. S.
2021-06-23  8:44         ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNGu80s+NHMGw6jf@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=niteesh.gs@gmail.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.