[Libvirt-cim] [PATCH 1 of 7] Add Resource Pool types to svpc_types.h

Dan Smith danms at us.ibm.com
Wed Mar 5 17:07:11 UTC 2008


This has gotten a little messy and disjoint, so I'm definitely in
favor of cleaning it up.

HE> -#define CIM_RASD_TYPE_PROC  3
HE> -#define CIM_RASD_TYPE_MEM   4
HE> -#define CIM_RASD_TYPE_NET  10
HE> -#define CIM_RASD_TYPE_DISK 17
HE> +#define CIM_TYPE_ALL            0
HE> +#define CIM_RES_TYPE_PROC       3
HE> +#define CIM_RES_TYPE_MEM        4
HE> +#define CIM_RES_TYPE_NET        10
HE> +#define CIM_RES_TYPE_DISK       17
HE> +#define CIM_RES_TYPE_UNKNOWN    1000
HE> +
HE> +#define CIM_RASD_TYPE_PROC      CIM_RES_TYPE_PROC
HE> +#define CIM_RASD_TYPE_MEM       CIM_RES_TYPE_MEM
HE> +#define CIM_RASD_TYPE_NET       CIM_RES_TYPE_NET
HE> +#define CIM_RASD_TYPE_DISK      CIM_RES_TYPE_DISK
HE> +
HE> +#define CIM_POOL_TYPE_ALL       CIM_TYPE_ALL
HE> +#define CIM_POOL_TYPE_PROC      CIM_RES_TYPE_PROC
HE> +#define CIM_POOL_TYPE_MEM       CIM_RES_TYPE_MEM
HE> +#define CIM_POOL_TYPE_NET       CIM_RES_TYPE_NET
HE> +#define CIM_POOL_TYPE_DISK      CIM_RES_TYPE_DISK
HE> +#define CIM_POOL_TYPE_UNKNOWN   CIM_RES_TYPE_UNKNOWN

I know that in several places, we assume that a device type is the
same as the CIM resource type.  Above, you define CIM_RASD_TYPE_foo to
CIM_RES_TYPE_foo, presumably to avoid having to touch all the places
that use the former.  I think to reduce ambiguity and to enforce the
fact that these must remain the same, it would be better to just
change CIM_RASD_TYPE_foo to CIM_RES_TYPE_foo everywhere.

Thoughts?

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080305/9a8d4c46/attachment.sig>


More information about the Libvirt-cim mailing list