|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 1/7] add definitions for vm snapshot
Define libxl_disk_snapshot_type and libxl_disk_snapshot for VM
snapshot usage.
Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
---
tools/libxl/libxl_types.idl | 31 +++++++++++++++++++++++++++++++
tools/libxl/libxl_types_internal.idl | 8 ++++++++
2 files changed, 39 insertions(+)
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index ef346e7..f7a4c3e 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -793,3 +793,34 @@ libxl_psr_cat_info = Struct("psr_cat_info", [
("cos_max", uint32),
("cbm_len", uint32),
])
+
+libxl_disk_snapshot_type = Enumeration("disk_snapshot_type", [
+ (0, "INVALID"),
+ (1, "INTERNAL"),
+ (2, "EXTERNAL"),
+ ])
+
+libxl_disk_snapshot = Struct("disk_snapshot",[
+ # target disk
+ ("disk", libxl_device_disk),
+
+ # disk snapshot name
+ ("name", string),
+
+ ("u", KeyedUnion(None, libxl_disk_snapshot_type, "type",
+ [("external", Struct(None, [
+
+ # disk format for external files. Since external disk snapshot is
+ # implemented with backing file mechanism, the external file disk
+ # format must support backing file. This field can be NULL, then
+ # a proper disk format will be used by default according to the
+ # orignal disk format.
+ ("external_format", libxl_disk_format),
+
+ # external file path. This field should be non-NULL and a new path.
+ ("external_path", string),
+ ])),
+ ("internal", None),
+ ("invalid", None),
+ ])),
+ ])
diff --git a/tools/libxl/libxl_types_internal.idl
b/tools/libxl/libxl_types_internal.idl
index 5e55685..60dce1d 100644
--- a/tools/libxl/libxl_types_internal.idl
+++ b/tools/libxl/libxl_types_internal.idl
@@ -45,3 +45,11 @@ libxl__device_action = Enumeration("device_action", [
(1, "ADD"),
(2, "REMOVE"),
])
+
+libxl_disk_snapshot_op = Enumeration("disk_snapshot_op", [
+ (1, "CREATE"),
+ (2, "DELETE"),
+ (3, "REVERT"),
+ (4, "LIST"),
+ ])
+
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |