I am using the Common Information Model (CIM) to model an infrastructure. The model describes a number of classes for different IT systems. It is comprehensive, so that it consists of a series hierarchies rather than one. For example, to represent a physical server chassis, you define an instance of CIM_Chassis. Then to represent the logical server that would run on that hardware, you define an instance of CIM_ComputerSystem. You should then associate the two with an instance of CIM_SystemPackaging, to note that one is provided by the other. There's no property in either class where you can set one as property of another. They are two separate classes, associated by the third. The model will be described in XML, validated by the current XML Schema for CIM. I don't understand from the XSD for CIM_SystemPackaging, what content it is supposed to contain.
This XML demonstrates the problem (chassis is the alias for CIM_Chassis.xsd, etc.):
<chassis:CIM_Chassis>
<chassis:CreationClassName>CIM_Chassis</chassis:CreationClassName>
<chassis:Manufacturer>Cisco</chassis:Manufacturer>
<chassis:Model>Catalyst 6000</chassis:Model>
<chassis:Tag>6548431</chassis:Tag>
</chassis:CIM_Chassis>
<computer:CIM_ComputerSystem>
<computer:CreationClassName>CIM_ComputerSystem</computer:CreationClassName>
<computer:Name>Switch1</computer:Name>
</computer:CIM_ComputerSystem>
<sp:CIM_SystemPackaging>
<sp:Antecedent>?</sp:Antecedent>
<sp:Dependent>?</sp:Dependent>
</sp:CIM_SystemPackaging>
What should I put where the ? are? The schema documentation is silent on the matter, and there seem to be no XML examples on the web. This does not validate:
E [Xerces] cvc-complex-type.2.4.b: The content of element 'sp:Antecedent' is not complete. One of '{WC[##other:"http://schemas.dmtf.org/wbem/wscim/1/common",""]}' is expected.
In the Schema, Dependent and Antecedent are of type cimReference, which is:
<xs:complexType name="cimReference">
<xs:sequence>
<xs:any namespace="##other" maxOccurs="unbounded" processContents="lax"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
So that doesn't help me much. I wondered if I am meant to do embed the instance inside the antecedent:
<sp:CIM_SystemPackaging>
<sp:Antecedent>
<chassis:CIM_Chassis>
...etc...
</chassis:CIM_Chassis>
</sp:Antecedent>
<sp:Dependent>
<computer:CIM_ComputerSystem>
...etc...
</computer:CIM_ComputerSystem>
</sp:Dependent>
</sp:CIM_SystemPackaging>
This validates OK, but wouldn't seem to scale. Since there could be an object for each piece of hardware inside the chassis, and they all need to be associated with the chassis with similar association classes, it would quickly become impossible. It also seems to go against the whole association model. Is anyone familiar enough with CIM to explain how it is supposed to work?