[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V6 11/14] qmp: add interface query-snapshots
From: |
Wenchao Xia |
Subject: |
Re: [Qemu-devel] [PATCH V6 11/14] qmp: add interface query-snapshots |
Date: |
Tue, 19 Feb 2013 06:46:43 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
Hi, Eric
About the interface,there is actually requirement to know internal
snapshots in an image of a backing file, so I think the API should be
improved as:
# @query-snapshots:
#
# Get a list of internal snapshots for whole virtual machine or a single
# block device. Note that in first case, only valid internal snapshot
# will be returned, inconsistent ones will be ignored.
#
# @device: #optional the name of the device to get snapshot info from. #
If not specified, only valid snapshots for whole vm would be
# returned.
# @image: #optional the image's name in the backing chain, only valid
# when device is specified. If it is not specified, the
# internal snapshots on the top of the chain will be shown.
# Otherwise qemu will try search the image on the chain on
# that device.
#
# Returns: a list of @SnapshotInfo describing all consistent virtual #
machine
# snapshots.
#
# Since: 1.5
##
{ 'command': 'query-snapshots',
'data': { '*device': 'str', '*image': 'str' },
'returns': ['SnapshotInfo'] }
What do you think of the API?
##
+# @query-snapshots:
+#
+# Get a list of internal snapshots for whole virtual machine or a single
+# block device. Note that in first case, only valid internal snapshot will be
+# returned, inconsistent ones will be ignored.
+#
+# @device: #optional the name of the device to get snapshot info from. If not
+# specified, only valid snapshots for whole vm would be returned.
+#
+# Returns: a list of @SnapshotInfo describing all consistent virtual machine
+# snapshots.
+#
+# Since: 1.5
+##
+{ 'command': 'query-snapshots',
+ 'data': { '*device': 'str' },
+ 'returns': ['SnapshotInfo'] }
+
+##
# @BlockDeviceStats:
#
# Statistics of a virtual block device or a block backing device.
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 292d61e..846e23e 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1819,6 +1819,59 @@ EQMP
},
--
Best Regards
Wenchao Xia
- Re: [Qemu-devel] [PATCH V6 09/14] block: move bdrv_snapshot_find() to block.c, (continued)
- [Qemu-devel] [PATCH V6 08/14] qmp: add interface query-images., Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 14/14] hmp: show snapshots on single block device, Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 10/14] block: distinguish id and name in bdrv_find_snapshot(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 05/14] block: add snapshot info query function bdrv_query_snapshot_infolist(), Wenchao Xia, 2013/02/18
- [Qemu-devel] [PATCH V6 11/14] qmp: add interface query-snapshots, Wenchao Xia, 2013/02/18
- Re: [Qemu-devel] [PATCH V6 11/14] qmp: add interface query-snapshots,
Wenchao Xia <=
[Qemu-devel] [PATCH V6 13/14] hmp: switch snapshot info function to qmp based one, Wenchao Xia, 2013/02/18