qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]