From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNlBE-0001jG-6F for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:43:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNlBA-0001tx-V4 for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:43:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNlBA-0001tm-Mj for qemu-devel@nongnu.org; Mon, 25 Jan 2016 12:43:52 -0500 References: <1453464955-1601-1-git-send-email-valentin.rakush@gmail.com> <56A27CD0.8070701@redhat.com> From: Eric Blake Message-ID: <56A65ED5.2030107@redhat.com> Date: Mon, 25 Jan 2016 10:43:49 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q3uNRw7vo6Mxr1NNL8pWNLCvV7fNtUVQa" Subject: Re: [Qemu-devel] [PATCH v4] qom, qmp, hmp, qapi: create qom-type-prop-list for class properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Valentin Rakush Cc: Markus Armbruster , qemu-devel@nongnu.org, lcapitulino@redhat.com, asmetanin@virtuozzo.com, "Denis V. Lunev" , =?UTF-8?Q?Andreas_F=c3=a4rber?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q3uNRw7vo6Mxr1NNL8pWNLCvV7fNtUVQa Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/22/2016 01:20 PM, Valentin Rakush wrote: > Hi Eric, hi Daniel, >=20 > Re dashes in the command name >=20 > AFAICC, the QOM related command in HMP use dash "-". For example, qom-l= ist > and qom-set. If we will change dash "-" to underscore "_" then > qom_type_prop_list will be consistent with old HMP commands (created be= fore > year 2013), but will _not_ be consistent with QOM commands created afte= r > 2013. Which is not nice and may be misleading. Well, HMP is not set in stone. We can rename the HMP command to qom_list and qom_set, if we want consistency so that _all_ HMP commands prefer _. >=20 > If we want to have consistent naming of all HMP commands, then we shoul= d > rename all QOM commands to replace "-" to "_". But in this case we can > brake compatibility in possible scripts that already use these commands= =2E > For example, scripts/qmp/qom-fuse Any script using HMP is already broken, because HMP is not designed for scriptability. Scripts should be using QMP, and QMP has stricter rules about not arbitrarily changing names. >=20 > I would leave name qom-type-prop-list with dashes, so it will be consis= tent > with other two QOM commands and would refactor all QOM commands names i= f > possible. I'm not asking you to change the QMP name, just the HMP name. >=20 > Re subcommand of the info command >=20 > Also from hmp-command.hx I can see that info command shows various > information about the _system_state_ The qom-type-prop-list shows > properties of the class type. They can be changed during runtime, but I= am > not sure if they can be referred as a system state. From another side > command like "info class x86_64-cpu" could take less typing, but this w= ill > be inconsistent with QMP version of the command. We aren't aiming for equivalence between QMP and HMP. It's fine for the HMP command to be higher-level, have more smarts, and have more consistency with other HMP commands. >=20 > For this reasons I would leave qom-type-prop-list as it is right now. Since HMP is not scriptable, I am not going to hold up the patch on bikeshedding how the HMP command is spelled. I just wanted to point out the difference in conventions, and that you are adding an exception to the conventions. >=20 > Daniel have reviewed this patch already but found my error in the > parameters of the HMP command. I have fixed this error and tested comma= nd > with monitor. But would it be ok to add QMP and HMP tests to this patc= h? > Or may be submit tests with another patch, because this one is already > reviewed? I do not see much QMP/HMP tests so I am hesitating if this is= a > good idea. Another idea is to add ONLY a QMP command, and omit the functionality from HMP altogether. If someone finds the HMP interface important, they can submit a later patch to add it on top of the QMP command. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Q3uNRw7vo6Mxr1NNL8pWNLCvV7fNtUVQa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWpl7VAAoJEKeha0olJ0NqRJkH/R2RaO3Sh21K+UmdbHF+Covv i7fHWMXHZeuJURasbnQshHBWmKr7AsMHYgIahntJXxE0vu6nXfHKVZ8qNwWkPrI/ dtfNisJ+CXQd5A79SgrVM7ecnz3/1S/D0X1aL63N8J/YxMeauaGWtA5zkfrZX6M8 yDel/lzloJtoEwjjPiIWEmytn0eM9nxX359qw1KUCxGgh0VehbFe0bH2vQD0Mr0P 3tVSIh+vLP9z0MGWMpl9QVM6cOQ5Isk+CQz8gg8XtF123miR58VgQsq9UvMYdOPU wgQoyKHkODfpqfqTNxKMQ9MfS71pQmrXBerovgkWJPBrDM0utag9NY6gqyNF7ys= =9r/W -----END PGP SIGNATURE----- --Q3uNRw7vo6Mxr1NNL8pWNLCvV7fNtUVQa--