Blob Blame History Raw
# HG changeset patch
# User Jim Fehlig <jfehlig@novell.com>
# Date 1218219221 21600
# Node ID 380a563d6f54bf073ddd94eeafb626f29c586d18
# Parent  b5bbd672c2bf32810192260075d100689b99d86a
Override CreateSnapshot extrinsic to include vendor-defined values

Some tools will parse the class info and format gui based on qualifiers
it finds.  In the case of CreateSnapshot, such tools will not display
the vendor additions unless the method is overridden to describe the
additions.

This patch introduces a new class Virt_VirtualSystemSnapshotService
where CreateSnapshot is overridden.  The various virtualizer flavors
then inherit from that.

     Signed-off-by: Jim Fehlig <jfehlig@novell.com>

diff -r b5bbd672c2bf -r 380a563d6f54 schema/VirtualSystemSnapshotService.mof
--- a/schema/VirtualSystemSnapshotService.mof	Thu Aug 07 11:40:57 2008 -0700
+++ b/schema/VirtualSystemSnapshotService.mof	Fri Aug 08 12:13:41 2008 -0600
@@ -1,8 +1,59 @@
 // Copyright IBM Corp. 2008
 
-[Description ( "Snapshot types are as follows: "
-	       "32768: Memory-only snapshot (suspend, resume, keep image)"
-	       "32769: Memory-only, terminal (domain is offline after op)")]
-class Xen_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
-class KVM_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
-class LXC_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { };
+[Description (
+       "Service to create, apply and destroy snapshots of virtual systems."
+        )]
+class Virt_VirtualSystemSnapshotService: CIM_VirtualSystemSnapshotService {
+      [Override, Description ( "Creates a snapshot of a virtual system." ),
+       ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096",
+          "4097..32767", "32768..65535" },
+       Values { "Completed with No Error", "Not Supported",
+          "Failed", "Timeout", "Invalid Parameter", "Invalid State",
+          "Invalid Type", "DMTF Reserved",
+          "Method Parameters Checked - Job Started",
+          "Method Reserved", "Vendor Specific" }]
+   uint32 CreateSnapshot(
+         [In, Description (
+             "Reference to the affected virtual system." )]
+      CIM_ComputerSystem REF AffectedSystem,
+         [In, Description ( "Parameter settings." ),
+          EmbeddedInstance ( "CIM_SettingData" )]
+      string SnapshotSettings,
+         [In, Description (
+             "Requested snapshot type:\n"
+             "Full Snapshot: Complete snapshot of the virtual system.\n"
+             "Disk Snapshot: Snapshot of virtual system disks.\n"
+             "Memory Snapshot: Snapshot of virtual system memory only. "
+             "The virtual system remains active after memory snapshot "
+             "is complete.\n"
+             "Memory Snapshot Terminal: Snapshot of virtual system "
+             "memory only.  The virtual system is transitioned to "
+             "disabled state after the memory snapshot is complete.\n" ),
+          ValueMap { "2", "3", "..", "32768", "32769", "32770..65535" },
+          Values { "Full Snapshot", "Disk Snapshot",
+             "DMTF Reserved", "Memory Snapshot", "Memory Snapshot Terminal",
+             "Vendor Specific" },
+          ModelCorrespondence {
+             "CIM_VirtualSystemSnapshotCapabilities.SnapshotTypesEnabled",
+             "CIM_VirtualSystemSnapshotServiceCapabilities.SnapshotTypesSupported" }]
+      uint16 SnapshotType,
+         [In, Out, Description (
+             "Resulting virtual system snapshot" )]
+      CIM_VirtualSystemSettingData REF ResultingSnapshot,
+         [In, Out, Description (
+             "If the operation is long running, then optionally "
+             "a job may be returned. In this case, the instance "
+             "of the CIM_VirtualSystemSettingData class "
+             "representing the new virtual system snapshot is "
+             "presented via the CIM_AffectedJobElement "
+             "association with the value of the AffectedElement "
+             "property referring to the new instance of the "
+             "CIM_VirtualSystemSettingData class representing "
+             "the virtual system snapshot and and the value of "
+             "the ElementEffects set to 5 (Create)." )]
+      CIM_ConcreteJob REF Job);
+};
+
+class Xen_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };
+class KVM_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };
+class LXC_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { };