[Libvirt-cim] [PATCH 1 of 2] Add get_rasd_instance_from_ref() to RASD

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Wed Nov 21 15:40:37 UTC 2007


Dan Smith wrote:
> Doesn't the same go for the type?  If you are in VSSDC, say, then you
> have probably have a ref of root/virt:Xen_VSSDC.InstanceID="Xen:foo",
> which will not resolve to a valid type if you call
> rasd_type_from_classname() on it, as above.
>
> In most of our other external interfaces like this, we pass around a
> char *id and a uint16_t type, which is one of CIM_RASD_TYPE_*, per
> svpd_types.h.  See Virt_DevicePool.h:get_pool_by_type() for example.
>
> KR> +        inst = get_rasd_instance(context, ref, broker, id, type);
>
> Also, since we're not really getting the RASD information from the
> ref, I'm not sure the function is properly named, nor needed at this
> point.  I think simply making the get_rasd_instance() non-static and
> exposed will do what we want, right?
>   
Yes, I think you're right.  Trying to encapsulate this behavior only 
works for some cases.  It isn't generic enough to warrant a new 
function.  Will generate a new patch. =)

-- 
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com





More information about the Libvirt-cim mailing list