qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: Implementation of QMP documentation retrieval command


From: Vladimir Sementsov-Ogievskiy
Subject: Re: RFC: Implementation of QMP documentation retrieval command
Date: Tue, 22 Jun 2021 14:04:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

22.06.2021 13:26, Daniel P. Berrangé wrote:
There's a more fundamental question about structure here too.
The documentation is not a arbitrary block of text. It contains
specific data items for individual parameters, and return
type, along with version number annotation too.

If we're returning a single string, then the caller needs to
know how to parser the current docs structure we're using
for commands. Right now that's an internal only format, and
I'm not sure we want to expose that as an ABI to consumers
of QEMU. So quite possibly we need to return structured
data instead

eg potentially we need

    { 'struct': 'CommandDocumentation',
      'data': {'name': 'str',
               'summary': 'str'
               'description: 'str'
              'parameters': ['str'],
              'return': str,
              'since': str,
              'notes': str,
              'example':str,
             } }


If make 'since' a separate field, it make sense to report appropriate 'since' 
for each parameter, so parameters would not be a simple list of strings.. Not 
saying of types of parameters.

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]