Attribute Mapping

The attribute mapping file attributemapping.xml defines the mapping between the attributes of a service in OM and the attributes of a CI in the RTSM.

The attribute mapping file attributemapping.xml defines the mapping between the attributes of a discovered object and the attributes of a CI in the RTSM.

Set the value of the attribute of the given name to the returned value of the given operand. If more than one operand is given, the values will be concatenated.

Mapping to String Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetValue>
        [Operands]
    </SetValue>
</CMDBCMDBCMDBOMAttribute>

Mapping to String Values of a Maximum Length

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetValue Length="[IntegerValue]">
        [Operands]
    </SetValue>
</CMDBCMDBOMAttribute>

Mapping to Integer Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetIntValue>
        [Operands]
    </SetIntValue>
</CMDBCMDBOMAttribute>

Mapping to Boolean Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetBoolValue>
        [Operands]
    </SetBoolValue>
</CMDBCMDBOMAttribute>

Mapping to Long Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetLongValue>
        [Operands]
    </SetLongValue>
</CMDBCMDBOMAttribute>

Mapping to Date Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetdateValue>
        [Operands]
    </SetdateValue>
</CMDBCMDBOMAttribute>

Mapping to Float Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetFloatValue>
        [Operands]
    </SetFloatValue>
</CMDBCMDBOMAttribute>

Mapping to Byte Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetByteValue>
        [Operands]
    </SetByteValue>
</CMDBCMDBOMAttribute>

Mapping to Double Values

<CMDBCMDBOMAttribute>
    <Name>[Attribute Name]</Name>
    <SetDoubleValue>
        [Operands]
    </SetDoubleValue>
</CMDBCMDBOMAttribute>

Mapping to StringList Values

<CMDBAttribute>
    <Name>[Attribute Name]</Name>
    <SetStringListValue>
        [Operands] (comma-separated)
    </SetStringListValue>
</CMDBAttribute>

Mapping to StringList Values

<CMDBAttribute>
    <Name>[Attribute Name]</Name>
    <SetStringListValue>
        [Operands] (comma-separated)
    </SetStringListValue>
</CMDBAttribute>

Mapping to IntList Values

<CMDBAttribute>
    <Name>[Attribute Name]</Name>
    <SetIntListValue>
        [Operands] (comma-separated)
    </SetIntListValue>
</CMDBAttribute>

Mapping to IntList Values

<CMDBAttribute>
    <Name>[Attribute Name]</Name>
    <SetIntListValue>
        [Operands] (comma-separated)
    </SetIntListValue>
</CMDBAttribute>

Attribute Mapping Example

For all CIs (no matter which context is assigned) the CMDB attribute display_label is set to the Caption of the OM CI. CIs that are assigned to the context exchange have data_name and for nodes the host_key attribute set to the OM ID.

<Mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="../../../schemas/mapping.xsd">
  <Rules>
    <Rule name="Map Display Label">
      <Condition>
        <True/>
      </Condition>
      <MapTo>
        <CMDBAttribute>
          <Name>display_label</Name>
          <SetValue>
            <Caption/>
          </SetValue>
        </CMDBAttribute>
      </MapTo>
    </Rule>
  </Rules>
  <Rules Context="exchange">
    <Rule name="Set data_name key attribute">
      <Condition>
        <True/>
      </Condition>
      <MapTo>
        <CMDBAttribute>
          <Name>data_name</Name>
          <SetValue>
            <OMId/> 
          </SetValue>
        </CMDBAttribute>
      </MapTo>
    </Rule>
    <Rule name="Set host_key key attribute for nodes">
      <Condition>
        <IsNode/>
      </Condition>
      <MapTo>
        <CMDBAttribute>
          <Name>host_key</Name>
          <SetValue>
            <OMId/> 
          </SetValue>
        </CMDBAttribute>
      </MapTo>
    </Rule>
  </Rules>
</Mapping>