cu_parse_embedded_instance() different results on sfcb & pegasus

The VSMS.defineSystem method on pegasus currently blocks on the this difference: After cu_parse_embedded_instance(), I can get a correct value on those integer type property (e.g. ResourceType) with a sfcb CIMOM. But I failed to get any value from a pegasus CIMOM. Try the following patch: diff -r 0868c5ff8fd7 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Oct 25 09:39:46 2007 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Oct 29 17:42:52 2007 +0800 @@ -56,8 +56,21 @@ static int parse_str_inst_array(CMPIArra _BROKER, &inst); - if (ret == 0) + if (ret == 0) { + int tret = 0; + char * mystr = NULL; + uint16_t myint = 0; + tret = cu_get_str_prop(inst, "InstanceID", &mystr); + if (tret == 0) { + printf("InstanceID = %s\n", mystr); + free(mystr); + } + tret = cu_get_u16_prop(inst, "ResourceType", &myint); + if (tret == 0) { + printf("ResourceType = %d\n", myint); + } inst_list_add(list, inst); + } } return 1; The actual code that breaks lives in the function classify_resources(), I added the patch above to the function parse_str_inst_array(), right after a successful cu_parse_embedded_instance(). On sfcb, you'll see both lines (InstanceID & ResourceType). But on pegasus, only the InstanceID lines. I turned on the EODEBUG macro. Messages from libcmpiutil told me that the integer types are set as SINT64 type. The lexer & parser also take all the integer types as sint64 type. Is that the cause? -- - Zhengang

ZL> The VSMS.defineSystem method on pegasus currently blocks on the ZL> this difference: After cu_parse_embedded_instance(), I can get a ZL> correct value on those integer type property (e.g. ResourceType) ZL> with a sfcb CIMOM. But I failed to get any value from a pegasus ZL> CIMOM. Right, I think the actual problem is that we incorrectly made ResourceType a key in the subclass MOF, which is not allowed. We will need to come up with a patch against all of the classes that deal with RASDs to make them not dependent on the ResourceType, but instead on the classname. I'm going to work on this right away and hopefully will have a patch shortly. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (2)
-
Dan Smith
-
Zhengang Li