From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y21vY-00083M-Jx for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:05:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y21vT-0005EN-KE for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:05:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y21vT-0005ED-B3 for qemu-devel@nongnu.org; Fri, 19 Dec 2014 13:05:19 -0500 Message-ID: <549468DC.8010102@redhat.com> Date: Fri, 19 Dec 2014 11:05:16 -0700 From: Eric Blake MIME-Version: 1.0 References: <1418979866-1615-1-git-send-email-kraxel@redhat.com> <1418979866-1615-10-git-send-email-kraxel@redhat.com> <87bnmz3i4u.fsf@blackfin.pond.sub.org> In-Reply-To: <87bnmz3i4u.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PULL 09/10] monitor: add query-vnc2 command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Gerd Hoffmann Cc: qemu-devel@nongnu.org, Anthony Liguori , Luiz Capitulino On 12/19/2014 06:04 AM, Markus Armbruster wrote: > Gerd Hoffmann 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