Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1193673965 25200
# Node ID 07b9be7502efdeead8b1ab83df2d13bcb5398548
# Parent 82ff2daf1ddb72c0bd8a83588a03bd7a37ea110b
Make RASD not dependent on ResourceType key
I have tested DefineSystem() and some of the ResourcePool associations.
It would be good to get a quick smoke test of the AllocationCapabilities
stuff as well, just to make sure I didn't break anything.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
@@ -315,13 +316,11 @@ static CMPIStatus alloc_cap_to_rasd(cons
struct inst_list *list)
{
CMPIStatus s = {CMPI_RC_OK};
- int ret;
uint16_t type;
CU_DEBUG("Getting ResourceType.\n");
- ret = cu_get_u16_path(ref, "ResourceType", &type);
- if (ret != 1) {
+ if (rasd_type_from_classname(CLASSNAME(ref), &type) != CMPI_RC_OK) {
CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
"Could not get ResourceType.");
goto out;
I think you got a little overzealous with this one. That ref it's
getting ResourceType from is an AllocationCapabilites reference, not a
RASD. If we need to make the same change for AllocationCapabilities, we
can do that, but as is right now that's definitely going to cause some
problems.
--
-Jay