The fact we're using CMPIStatus return
codes to set the CIM_Job's ErrorCode
property should probably be documented somewhere explicitly; there is otherwise
no actual correlation between this CIM property and CMPI's internal status
definitions... In particular, it is just a cooincidence that CMPI_RC_OK=0,
so probably below is perhaps a little better; change:
Because the CIM_Job mof is very explicit
about this:
[Description (
"A
vendor-specific error code. The value must be set to "
"zero if the Job completed without error. Note that this "
"property
is also present in the JobProcessingStatistics "
"class.
This class is necessary to capture the processing "
"information
for recurring Jobs, because only the \'last\' "
"run
error can be stored in this single-valued property." ),
ModelCorrespondence
{ "CIM_Job.ErrorDescription" }]
uint16 ErrorCode;
Otherwise +1
- G
Dr. Gareth S. Bestor
IBM Senior Software Engineer
Systems & Technology Group - Systems Management Standards
971-285-6375 (mobile)
bestor@us.ibm.com
[Libvirt-cim] [PATCH]
Return migration job status in CIM_ConcreteJob.ErrorCode
Sharad Mishra
to:
libvirt-cim
09/22/11 02:23 PM
Sent by:
libvirt-cim-bounces@redhat.com
Please respond to List for discussion
and development of libvirt CIM
# HG changeset patch
# User Sharad Mishra <snmishra@us.ibm.com>
# Date 1316716303 25200
# Node ID 5a025903b3dec8d8d5f35e7117be67f095d5fe21
# Parent fb09136deb494008eb3aacee420ad74da7d7c294
Return migration job status in CIM_ConcreteJob.ErrorCode
This patch returns migration job status using the ErrorCode
property. A successful migration returns 0 and a non-zero
value is returned on failed migration.