What is the best way to model a name/value pair in CIM?
John Dennis
jdennis at redhat.com
Mon Feb 25 17:51:31 UTC 2013
In the provider I'm writing lists of key/value pairs are needed in a few
different contexts (as a parameter to a method, as an instance property,
etc.).
In CIM what is the best way to to model a name/value pair? In CIM I
dont' think there is any mechanism by which the value can be of an
arbitrary type (right?). Therefore lets assume both the name and value
are strings.
I didn't find much in the existing core schema for modeling name/value.
There is the CIM_Configuration class but it's deprecated, replaced by
CIM_Setting. But CIM_Setting has semantics inappropriate for a general
name/value pair.
Is the best approach to define a new class that has just a name and
value property? (I can't imagine others haven't had the need for
name/value pairs, so shouldn't such a fundamental class be part of the
core schema? If so I haven't found it.) Such a class would not need a
key property [1] see below for a requested clarification.
If the best approach is to define a class with just a name and value
property then is the best way to to have a multiple name/values is to
define an array of references to the individual name/value instances?
There doesn't seem to be any need or advantage to introducing a
CIM_Collection for this purpose, or is there?
Are there examples of other CIM classes that use sets of name/value
pairs which would provide an example of best CIM practice for this?
[1] I've been a bit confused by the term "concrete" as used in the
context of CIM. One definition I've seen is a concrete class is any
non-abstract class. Another definition I saw was a concrete class is an
instantiated class instance. And yet a third definition I saw was a
concrete class has to have a one or more key properties. So two questions:
What is a concrete class?
Is defining a class without any key properties problematic if there is
no need to uniquely reference a specific class instance?
--
John Dennis <jdennis at redhat.com>
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
More information about the openlmi-devel
mailing list