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.

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.

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>