Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
211 views

Cannot push interface

ucmdb 10.22 cp 18.

Trying to get a custom db push adpater to send node & mac_adress to sql db.

The node is moving over fine, but the  ip_address is not mapping  correctly.

The input TQL returns ip and ip_address fine.

Also in the sql db I see 2 separate records being create - one for the host and one for the IP, but hte IP is blank.

I am seeing the below which I think is showing that it is geting the ip_Address but passingthe value.

<Object mode="update_else_insert" name="dbo.hardware" operation="add" mamId="FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A" id="FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A">
        <field name="ip_address" key="false" datatype="char" length="255"></field>
      </Object>

 

Mapping table below:

 

<?xml version="1.0" encoding="UTF-8"?>
<integration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="mappings_schema.xsd">
    <info>
        <source name="UCMDB"  versions="10.01" vendor="HP" />
       <target name="SQLServer" versions="10.50.4000" vendor="Microsoft" />
    </info>
    <targetcis>
        <!-- source_ci_type/source_ci_type_tree name = "<NAME OF UCMDB CLASS TO PULL DATA FROM>" -->
        <source_ci_type_tree name="node" mode="update_else_insert">
            <!-- target_ci_type name = "<NAME OF TABLE TO PUSH DATA TOO>" -->
            <target_ci_type name="dbo.hardware">
                <!-- targetprimarykey = "<MAPS THE SELECTED ATTRIBUTE AS THE TABLE PRIMARY KEY>" -->
                <!-- in this example we are generating primary key using an external db table so we
                don't need to map an UCMDB attribute -->
                <targetprimarykey/>
                <!-- target_attribute name = <"NAME OF THE COLUMN TO PUSH DATA TOO"> -->
                <target_attribute name="hostname" datatype="char" length="255" option="uppercase">
                    <!-- map source_attribute = <"NAME OF ATTRIBUTE TO RETRIEVE THE DATA"> -->
                    <map type="direct" source_attribute="name"/>
                </target_attribute>
            </target_ci_type>
        </source_ci_type_tree>
            <source_ci_type_tree name="ip_address" mode="update_else_insert">
            <target_ci_type name="dbo.hardware">
                <targetprimarykey/>
                 <target_attribute name="ip_address" datatype="char" length="255" option="uppercase">
                    <!-- map source_attribute = <"NAME OF ATTRIBUTE TO RETRIEVE THE DATA"> -->
                    <map type="direct" source_attribute="name"/>
                </target_attribute>
            </target_ci_type>
        </source_ci_type_tree>      
    </targetcis>
  <targetrelations>
    <source_link_type_tree name="containment" target_link_type="UCMDB_Relationship" mode="update_else_insert" source_ci_type_end1="node" source_ci_type_end2="ip_address">
      <target_ci_type_end1 name="node" />
      <target_ci_type_end2 name="ip_address" />
      <targetprimarykey/>
      <target_attribute name="NAME" datatype="char" length="255" option="uppercase">
          <map type="direct" source_attribute="name"/>
      </target_attribute>
  </source_link_type_tree>
    </targetrelations>
</integration>

 

In the log file getting:

 

<root>
  <data>
    <objects>
      <Object mode="update_else_insert" name="dbo.hardware" operation="add" mamId="FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A" id="FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A">
        <field name="hostname" key="false" datatype="char" length="255">UCMDB-TEST-03</field>
      </Object>
      <Object mode="update_else_insert" name="dbo.hardware" operation="add" mamId="FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A" id="FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A">
        <field name="ip_address" key="false" datatype="char" length="255"></field>
      </Object>
      <Object mode="update_else_insert" name="dbo.hardware" operation="add" mamId="FPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A" id="FPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A">
        <field name="ip_address" key="false" datatype="char" length="255"></field>
      </Object>
    </objects>
    <links>
      <link targetRelationshipClass="UCMDB_Relationship" targetParent="node" targetChild="ip_address" operation="add" mode="update_else_insert" mamId="end1id%5BFusePush%0Ant%0A1%0AID%3DSTRING%3D451%0A%5D%0Aend2id%5BPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A%5D%0AFPush%0Acontainment%0A1%0AID%3DSTRING%3D457%0A" id="end1id%5BFPush%0Ant%0A1%0AID%3DSTRING%3D451%0A%5D%0Aend2id%5BFPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A%5D%0AFPush%0Acontainment%0A1%0AID%3DSTRING%3D457%0A">
        <field name="DiscoveryID1">FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A</field>
        <field name="DiscoveryID2">FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A</field>
        <field name="end1Id">FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A</field>
        <field name="end2Id">FPush%0Aip_address%0A1%0AID%3DSTRING%3D454%0A</field>
        <field name="NAME" key="false" datatype="char" length="255"></field>
      </link>
      <link targetRelationshipClass="UCMDB_Relationship" targetParent="node" targetChild="ip_address" operation="add" mode="update_else_insert" mamId="end1id%5BFPush%0Ant%0A1%0AID%3DSTRING%3D451%0A%5D%0Aend2id%5BFPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A%5D%0AFusePush%0Acontainment%0A1%0AID%3DSTRING%3D456%0A" id="end1id%5BFusePush%0Ant%0A1%0AID%3DSTRING%3D451%0A%5D%0Aend2id%5BFPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A%5D%0AFPush%0Acontainment%0A1%0AID%3DSTRING%3D456%0A">
        <field name="DiscoveryID1">FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A</field>
        <field name="DiscoveryID2">FPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A</field>
        <field name="end1Id">FPush%0Ant%0A1%0AID%3DSTRING%3D451%0A</field>
        <field name="end2Id">FPush%0Aip_address%0A1%0AID%3DSTRING%3D455%0A</field>
        <field name="NAME" key="false" datatype="char" length="255"></field>
      </link>
    </links>
  </data>
</root>

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.