From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPyc4-00087x-JH for qemu-devel@nongnu.org; Wed, 10 Apr 2013 13:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPyc3-0002Tu-5M for qemu-devel@nongnu.org; Wed, 10 Apr 2013 13:15:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPyc2-0002Ta-T8 for qemu-devel@nongnu.org; Wed, 10 Apr 2013 13:15:11 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3AHF9L8012834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Apr 2013 13:15:09 -0400 Message-ID: <51659E1C.2050507@redhat.com> Date: Wed, 10 Apr 2013 11:15:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <877gkavlw2.fsf@blackfin.pond.sub.org> <516544C3.2060306@redhat.com> <516559EB.8020005@redhat.com> <5165719B.7020508@redhat.com> In-Reply-To: <5165719B.7020508@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2NTEMLAPEPDXURDBSRNVU" Subject: Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: lcapitulino@redhat.com, Markus Armbruster , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2NTEMLAPEPDXURDBSRNVU Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/10/2013 08:05 AM, Pavel Hrdina wrote: > Here is another proposal how to handle vm snapshots: >=20 > QMP vm-snapshot-save: > - { 'command': 'vm-snapshot-save', > 'data': { 'name': 'str' }, > 'returns': 'SnapshotInfo' } > - vm-snapshot-save returns an error if there is an existing > snapshot with the same name > - you cannot provide an id for a new snapshot > - on success all information about created snapshot will be returne= d >=20 > QMP vm-snapshot-load > - { 'command': 'vm-snapshot-load', > 'data': { '*name': 'str', '*id': 'int' }, > 'returns': 'SnapshotInfo' } > - one of the name or id must be provided > - if both are provided they will match only the snapshot with the > same name and id > - returns SnapshotInfo only if the snapshot exists. >=20 > QMP vm-snapshot-delete: > - { 'command': 'vm-snapshot-delete', > 'data': { '*name': 'str', '*id': 'int' }, > 'returns': 'SnapshotInfo' } > - same rules as vm-snapshot-load Missing some form of query-snapshots to list all consistent snapshots that can be loaded or deleted (or is that another series?) Also, while load can only take a consistent snapshot, it might make sense to expose two levels of delete - one that deletes consistent snapshots, and one that deletes a snapshot for a given block device regardless of whether it is consistent across all devices in use by the V= M. >=20 > HMP savevm: > - args_type =3D "force:-f,name:s?", > - if the name is not provided the HMP command will generates new > one for QMP command > - if there is already a snapshot with provided or generated name > it will fails > - there will be an optional -f parameter to force saving requested > snapshot and it will internally use vm-snapshot-delete and then > vm-snapshot-save > - all information about created snapshot will be printed >=20 > HMP loadvm: > - args_type =3D "name:s?,id:i?", > - follow the same behavior as the QMP command Except that with HMP, arguments are positional. You can't provide 'id' in isolation; by listing id:i? second, the parser requires that the first argument encountered is a name. I think a better interface might be: HMP loadvm: - args_type =3D "id:-i,name:s?' If just name is given, first do a tag lookup; if that fails do an id lookup. If the -i flag is given, skip the tag lookup just do an id looku= p. >=20 > HMP delvm: > - args_type =3D "name:s?,id:i?" > - same rules as loadvm Same comment as for loadvm. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2NTEMLAPEPDXURDBSRNVU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRZZ4cAAoJEKeha0olJ0NqA7YH/i5v43Fnes6uYMc96nZQxNqZ BkEqb0IBHw2nc4jo926JHdJHz7fpaPasl5ERALPl89XZXB73mdX1W4j/WL83dH/N hmHRd+pa6TK+xESUHcBr1+cvplUykkTZTdRaGmeJjvU7YoWFyL5C9BACNs60VJa2 tXwnJkYhre8ce5rzp9n4d8DWlU6FcBKLXPVN/D7DYb+Ifs2zravenbF6N9xB42ko nFY34/TwMh3SMG6EeHgdtTll5QxXcqxxFJh56Mew7jtFqFPbaFSfsPUHzf15f6kl H3MamMip5MDxfLMdHOyrKt3L0RneLGlPjyqIUVz2IT9MiKQI41yxdM58daDib8o= =1XGe -----END PGP SIGNATURE----- ------enig2NTEMLAPEPDXURDBSRNVU--