Kaitlin Rupert 8dcb85b
# HG changeset patch
Kaitlin Rupert 8dcb85b
# User Jim Fehlig <jfehlig@novell.com>
Kaitlin Rupert 8dcb85b
# Date 1218219221 21600
Kaitlin Rupert 8dcb85b
# Node ID 380a563d6f54bf073ddd94eeafb626f29c586d18
Kaitlin Rupert 8dcb85b
# Parent  b5bbd672c2bf32810192260075d100689b99d86a
Kaitlin Rupert 8dcb85b
Override CreateSnapshot extrinsic to include vendor-defined values
Kaitlin Rupert 8dcb85b
Kaitlin Rupert 8dcb85b
Some tools will parse the class info and format gui based on qualifiers
Kaitlin Rupert 8dcb85b
it finds.  In the case of CreateSnapshot, such tools will not display
Kaitlin Rupert 8dcb85b
the vendor additions unless the method is overridden to describe the
Kaitlin Rupert 8dcb85b
additions.
Kaitlin Rupert 8dcb85b
Kaitlin Rupert 8dcb85b
This patch introduces a new class Virt_VirtualSystemSnapshotService
Kaitlin Rupert 8dcb85b
where CreateSnapshot is overridden.  The various virtualizer flavors
Kaitlin Rupert 8dcb85b
then inherit from that.
Kaitlin Rupert 8dcb85b
Kaitlin Rupert 8dcb85b
     Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Kaitlin Rupert 8dcb85b
Kaitlin Rupert 8dcb85b
diff -r b5bbd672c2bf -r 380a563d6f54 schema/VirtualSystemSnapshotService.mof
Kaitlin Rupert 8dcb85b
--- a/schema/VirtualSystemSnapshotService.mof	Thu Aug 07 11:40:57 2008 -0700
Kaitlin Rupert 8dcb85b
+++ b/schema/VirtualSystemSnapshotService.mof	Fri Aug 08 12:13:41 2008 -0600
Kaitlin Rupert 8dcb85b
@@ -1,8 +1,59 @@
Kaitlin Rupert 8dcb85b
 // Copyright IBM Corp. 2008
Kaitlin Rupert 8dcb85b
 
Kaitlin Rupert 8dcb85b
-[Description ( "Snapshot types are as follows: "
Kaitlin Rupert 8dcb85b
-	       "32768: Memory-only snapshot (suspend, resume, keep image)"
Kaitlin Rupert 8dcb85b
-	       "32769: Memory-only, terminal (domain is offline after op)")]
Kaitlin Rupert 8dcb85b
-class Xen_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
Kaitlin Rupert 8dcb85b
-class KVM_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
Kaitlin Rupert 8dcb85b
-class LXC_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
Kaitlin Rupert 8dcb85b
+[Description (
Kaitlin Rupert 8dcb85b
+       "Service to create, apply and destroy snapshots of virtual systems."
Kaitlin Rupert 8dcb85b
+        )]
Kaitlin Rupert 8dcb85b
+class Virt_VirtualSystemSnapshotService: CIM_VirtualSystemSnapshotService {
Kaitlin Rupert 8dcb85b
+      [Override, Description ( "Creates a snapshot of a virtual system." ),
Kaitlin Rupert 8dcb85b
+       ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096",
Kaitlin Rupert 8dcb85b
+          "4097..32767", "32768..65535" },
Kaitlin Rupert 8dcb85b
+       Values { "Completed with No Error", "Not Supported",
Kaitlin Rupert 8dcb85b
+          "Failed", "Timeout", "Invalid Parameter", "Invalid State",
Kaitlin Rupert 8dcb85b
+          "Invalid Type", "DMTF Reserved",
Kaitlin Rupert 8dcb85b
+          "Method Parameters Checked - Job Started",
Kaitlin Rupert 8dcb85b
+          "Method Reserved", "Vendor Specific" }]
Kaitlin Rupert 8dcb85b
+   uint32 CreateSnapshot(
Kaitlin Rupert 8dcb85b
+         [In, Description (
Kaitlin Rupert 8dcb85b
+             "Reference to the affected virtual system." )]
Kaitlin Rupert 8dcb85b
+      CIM_ComputerSystem REF AffectedSystem,
Kaitlin Rupert 8dcb85b
+         [In, Description ( "Parameter settings." ),
Kaitlin Rupert 8dcb85b
+          EmbeddedInstance ( "CIM_SettingData" )]
Kaitlin Rupert 8dcb85b
+      string SnapshotSettings,
Kaitlin Rupert 8dcb85b
+         [In, Description (
Kaitlin Rupert 8dcb85b
+             "Requested snapshot type:\n"
Kaitlin Rupert 8dcb85b
+             "Full Snapshot: Complete snapshot of the virtual system.\n"
Kaitlin Rupert 8dcb85b
+             "Disk Snapshot: Snapshot of virtual system disks.\n"
Kaitlin Rupert 8dcb85b
+             "Memory Snapshot: Snapshot of virtual system memory only. "
Kaitlin Rupert 8dcb85b
+             "The virtual system remains active after memory snapshot "
Kaitlin Rupert 8dcb85b
+             "is complete.\n"
Kaitlin Rupert 8dcb85b
+             "Memory Snapshot Terminal: Snapshot of virtual system "
Kaitlin Rupert 8dcb85b
+             "memory only.  The virtual system is transitioned to "
Kaitlin Rupert 8dcb85b
+             "disabled state after the memory snapshot is complete.\n" ),
Kaitlin Rupert 8dcb85b
+          ValueMap { "2", "3", "..", "32768", "32769", "32770..65535" },
Kaitlin Rupert 8dcb85b
+          Values { "Full Snapshot", "Disk Snapshot",
Kaitlin Rupert 8dcb85b
+             "DMTF Reserved", "Memory Snapshot", "Memory Snapshot Terminal",
Kaitlin Rupert 8dcb85b
+             "Vendor Specific" },
Kaitlin Rupert 8dcb85b
+          ModelCorrespondence {
Kaitlin Rupert 8dcb85b
+             "CIM_VirtualSystemSnapshotCapabilities.SnapshotTypesEnabled",
Kaitlin Rupert 8dcb85b
+             "CIM_VirtualSystemSnapshotServiceCapabilities.SnapshotTypesSupported" }]
Kaitlin Rupert 8dcb85b
+      uint16 SnapshotType,
Kaitlin Rupert 8dcb85b
+         [In, Out, Description (
Kaitlin Rupert 8dcb85b
+             "Resulting virtual system snapshot" )]
Kaitlin Rupert 8dcb85b
+      CIM_VirtualSystemSettingData REF ResultingSnapshot,
Kaitlin Rupert 8dcb85b
+         [In, Out, Description (
Kaitlin Rupert 8dcb85b
+             "If the operation is long running, then optionally "
Kaitlin Rupert 8dcb85b
+             "a job may be returned. In this case, the instance "
Kaitlin Rupert 8dcb85b
+             "of the CIM_VirtualSystemSettingData class "
Kaitlin Rupert 8dcb85b
+             "representing the new virtual system snapshot is "
Kaitlin Rupert 8dcb85b
+             "presented via the CIM_AffectedJobElement "
Kaitlin Rupert 8dcb85b
+             "association with the value of the AffectedElement "
Kaitlin Rupert 8dcb85b
+             "property referring to the new instance of the "
Kaitlin Rupert 8dcb85b
+             "CIM_VirtualSystemSettingData class representing "
Kaitlin Rupert 8dcb85b
+             "the virtual system snapshot and and the value of "
Kaitlin Rupert 8dcb85b
+             "the ElementEffects set to 5 (Create)." )]
Kaitlin Rupert 8dcb85b
+      CIM_ConcreteJob REF Job);
Kaitlin Rupert 8dcb85b
+};
Kaitlin Rupert 8dcb85b
+
Kaitlin Rupert 8dcb85b
+class Xen_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };
Kaitlin Rupert 8dcb85b
+class KVM_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };
Kaitlin Rupert 8dcb85b
+class LXC_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };