qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 09/10] monitor: add query-vnc2 command


From: Eric Blake
Subject: Re: [Qemu-devel] [PULL 09/10] monitor: add query-vnc2 command
Date: Fri, 19 Dec 2014 11:05:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 12/19/2014 06:04 AM, Markus Armbruster wrote:
> Gerd Hoffmann <address@hidden> writes:
> 
>> Add new query vnc qmp command, for the lack of better ideas just name it
>> "query-vnc2".  Changes over query-vnc:
>>
>>  * It returns a list of vnc servers, so multiple vnc server instances
>>    are covered.
>>  * Each vnc server returns a list of server sockets.  Followup patch
>>    will use that to also report websockets.  In case we add support for
>>    multiple server sockets server sockets (to better support ipv4+ipv6
>>    dualstack) we can add them to the list too.
> 
> I guess we could shoehorn this into query-vnc by having it return an
> anonymous union and use an optional parameter to select the alternative.
> Too much trouble just to avoid an ugly name.
> 
> Call it query-vnc-servers?

Might be a nicer name, indeed.

>>  ##
>> +# @VncPriAuth:
> 
> I don't personally mind abbreviations, but maybe somebody else does:
> QAPI / QMP tends to spell things out, like VncPrimaryAuthentication.
> Maybe just VncPrimaryAuth, since there's precedence for abbreviating
> authentication that way.

"A rose by any other name would smell as sweet". But I'm okay with
VncPrimaryAuth.

> 
> Schema looks good to me otherwise, but I'd like to hear Eric's opinion.

Yes, other than documentation/naming nits, the schema looks fine.

> 
> If the schema let us specify the enumeration values, we could avoid the
> mapping altogether.

Ooh, cool thought: what if we allowed:

{ 'enum': 'Foo', 'data': [
  { 'name': 'One', 'value': 1 },
  { 'name': 'Two', 'value': 2 } ] }

as a way to force 1 and 2 (rather than the default of first string in
the list getting 0)?  Would we allow aliases, or if you specify a value,
must all names be unique?  Would it be C-like semantics where you can
mix and match name-only shorthand with name/values, and where name-only
entries default to one greater than the previous value, starting at 0?
But that's in the same category as future patches that would let us
specify default values - that is, someone has to do the work to add the
extension and enhance the testsuite/documentation to cover it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



reply via email to

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