# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1217012608 25200
# Node ID 466808eaaefaf26e1200ab6ce57dc7b96b9ee7c7
# Parent a3aa7dff01cc4128a55553c6cfbbf1123441c272
Fix ReferenceConfiguration parameter parsing to properly expect a VSSD
Which means grabbing InstaceID instead and parsing out the name. I think
a test was recently added for ReferenceConfiguration, so that will need
to change, as it was based on the code and not the schema.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r a3aa7dff01cc -r 466808eaaefa src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Fri Jul 25 11:56:55 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Fri Jul 25 12:03:28 2008 -0700
@@ -813,7 +813,8 @@
{
virConnectPtr conn = NULL;
virDomainPtr dom = NULL;
- const char *name;
+ char *name = NULL;
+ const char *iid;
CMPIStatus s;
int ret;
@@ -833,11 +834,19 @@
}
}
- if (cu_get_str_path(refconf, "Name", &name) != CMPI_RC_OK) {
- CU_DEBUG("Missing Name parameter");
+ if (cu_get_str_path(refconf, "InstanceID", &iid) != CMPI_RC_OK) {
+ CU_DEBUG("Missing InstanceID parameter");
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_INVALID_PARAMETER,
- "Missing `Name' from ReferenceConfiguration");
+ "Missing `InstanceID' from
ReferenceConfiguration");
+ goto out;
+ }
+
+ if (!parse_id(iid, NULL, &name)) {
+ CU_DEBUG("Failed to parse InstanceID: %s", iid);
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_INVALID_PARAMETER,
+ "Invalid `InstanceID' from
ReferenceConfiguration");
goto out;
}
@@ -868,6 +877,7 @@
out:
virDomainFree(dom);
virConnectClose(conn);
+ free(name);
return s;
}
Show replies by date
Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1217012608 25200
# Node ID 466808eaaefaf26e1200ab6ce57dc7b96b9ee7c7
# Parent a3aa7dff01cc4128a55553c6cfbbf1123441c272
Fix ReferenceConfiguration parameter parsing to properly expect a VSSD
Which means grabbing InstaceID instead and parsing out the name. I think
a test was recently added for ReferenceConfiguration, so that will need
to change, as it was based on the code and not the schema.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r a3aa7dff01cc -r 466808eaaefa src/Virt_VirtualSystemManagementService.c
+1
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com