[Libvirt-cim] [PATCH] Return job reference in SnapshotService

Jim Fehlig jfehlig at novell.com
Thu Dec 4 15:43:15 UTC 2008


# HG changeset patch
# User Jim Fehlig <jfehlig at novell.com>
# Date 1228408911 25200
# Node ID ef03ffafe2dd00f3e2a78a2bce1cb9b4836b5d2b
# Parent  ae687011f6def5df176e5b9b553b93e9f907b7d6
Return job reference in SnapshotService

Jobs are created for create and apply operations on SnapshotService
but not returned to client.  This patch simply places the job
reference in output args.

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

diff -r ae687011f6de -r ef03ffafe2dd src/Virt_VirtualSystemSnapshotService.c
--- a/src/Virt_VirtualSystemSnapshotService.c	Wed Dec 03 16:21:29 2008 -0200
+++ b/src/Virt_VirtualSystemSnapshotService.c	Thu Dec 04 09:41:51 2008 -0700
@@ -382,7 +382,8 @@ static CMPIStatus start_snapshot_job(con
 static CMPIStatus start_snapshot_job(const CMPIObjectPath *ref,
                                      const CMPIContext *context,
                                      const char *name,
-                                     uint16_t type)
+                                     uint16_t type,
+                                     CMPIArgs *argsout)
 {
         struct snap_context *ctx;
         CMPIStatus s;
@@ -400,6 +401,7 @@ static CMPIStatus start_snapshot_job(con
         ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEMT);
 
         s = create_job(context, ref, ctx, &job);
+        CMAddArg(argsout, "Job", (CMPIValue *)&job, CMPI_ref);
 
  out:
         return s;
@@ -457,7 +459,7 @@ static CMPIStatus create_snapshot(CMPIMe
                 goto out;
         }
 
-        s = start_snapshot_job(reference, context, name, type);
+        s = start_snapshot_job(reference, context, name, type, argsout);
 
         retcode = CIM_RETURN_COMPLETED;
  out:
@@ -556,7 +558,7 @@ static CMPIStatus apply_snapshot(CMPIMet
                 goto out;
         }
 
-        s = start_snapshot_job(reference, context, name, 0);
+        s = start_snapshot_job(reference, context, name, 0, argsout);
 
         retcode = CIM_RETURN_COMPLETED;
 




More information about the Libvirt-cim mailing list