From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPveJ-0000Ik-NF for qemu-devel@nongnu.org; Wed, 10 Apr 2013 10:05:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPveI-00035W-G0 for qemu-devel@nongnu.org; Wed, 10 Apr 2013 10:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPveI-00035J-7F for qemu-devel@nongnu.org; Wed, 10 Apr 2013 10:05:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3AE5H3B025142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Apr 2013 10:05:17 -0400 Message-ID: <5165719B.7020508@redhat.com> Date: Wed, 10 Apr 2013 16:05:15 +0200 From: Pavel Hrdina MIME-Version: 1.0 References: <877gkavlw2.fsf@blackfin.pond.sub.org> <516544C3.2060306@redhat.com> <516559EB.8020005@redhat.com> In-Reply-To: <516559EB.8020005@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Eric Blake Cc: lcapitulino@redhat.com, Markus Armbruster , qemu-devel@nongnu.org Here is another proposal how to handle vm snapshots: 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 returned 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. QMP vm-snapshot-delete: - { 'command': 'vm-snapshot-delete', 'data': { '*name': 'str', '*id': 'int' }, 'returns': 'SnapshotInfo' } - same rules as vm-snapshot-load HMP savevm: - args_type = "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 HMP loadvm: - args_type = "name:s?,id:i?", - follow the same behavior as the QMP command HMP delvm: - args_type = "name:s?,id:i?" - same rules as loadvm