Prepare for Adapter Creation

This task describes the preparations that are necessary for creating an adapter.

Note You can view samples for the Generic DB adapter in the UCMDB API. Specifically, the DDMi Adapter sample contains a complicated orm.xml file, as well as the implementations for some plug-in interfaces.

  1. Prerequisites

    To validate that you can use the database adapter with your database, check the following:

    • The reconciliation classes and their attributes (also known as multinodes) exist in the database. For example, if the reconciliation is run by node name, verify that there is a table that contains a column with node names. If the reconciliation is run according to node cmdb_id, verify that there is a column with CMDB IDs that matches the CMDB IDs of the nodes in the CMDB. For details on reconciliation, see Reconciliation.

      ID NAME IP_ADDRESS
      31 BABA 16.59.33.60
      33 ext3.devlab.ad 16.59.59.116
      46 LABM1MAM15 16.59.58.188
      72 cert-3-j2ee 16.59.57.100
      102 labm1sun03.devlab.ad 16.59.58.45
      114 LABM2PCOE73 16.59.66.79
      116 CUT 16.59.41.214
      117 labm1hp4.devlab.ad 16.59.60.182
    • To correlate two CITs with a relationship, there must be correlation data between the CIT tables. The correlation can be either by a foreign key column or by a mapping table. For example, to correlate between node and ticket, there must be a column in the ticket table that contains the node ID, a column in the node table with the ticket ID that is connected to it, or a mapping table whose end1 is the node ID and end2 is the ticket ID. For details on correlation data, see Hibernate as JPA Provider.

      The following table shows the foreign key NODE_ID column:

      NODE_ID CARD_ID CARD_TYPE CARD_NAME
      2015 1 Serial Bus Controller Intel � 82801EB USB Universal Host Controller
      3581 2 System Intel � 631xESB/6321ESB/3100 Chipset LPC
      3581 3 Display ATI ES1000
      3581 4 Base System Peripheral HP ProLiant iLO 2 Legacy Support Function
    • Each CIT can be mapped to one or more tables. To map one CIT to more than one table, check that there is a primary table whose primary key exists in the other tables, and is a unique value column.

      For example, a ticket is mapped to two tables: ticket1 and ticket2. The first table has columns c1 and c2 and the second table has columns c3 and c4. To enable them to be considered as one table, both must have the same primary key. Alternatively, the first table primary key can be a column in the second table.

      In the following example, the tables share the same primary key called CARD_ID:

      CARD_ID CARD_TYPE CARD_NAME
      1 Serial Bus Controller Intel � 82801EB USB Universal Host Controller
      2 System Intel � 631xESB/6321ESB/3100 Chipset LPC
      3 Display ATI ES1000
      4 Base System Peripheral HP ProLiant iLO 2 Legacy Support Function
      CARD_ID CARD_VENDOR
      1 Hewlett-Packard Company
      2 (Standard USB Host Controller)
      3 Hewlett-Packard Company
      4 (Standard system devices)
      5 Hewlett-Packard Company
  2. Create a CI Type

    In this step you create a CIT that represents the data in the RDBMS (the external data source).

    1. In UCMDB, access the CI Type Manager and create a new CI Type. For details, see How to Create a CI Type.

    2. Add the necessary attributes to the CIT, such as last access time, vendor, and so on. These are the attributes that the adapter will retrieve from the external data source and bring into CMDB views.

  3. Create a Relationship

    In this step you add a relationship between the UCMDB CIT and the new CIT that represents the data from the external data source.

    Add appropriate, valid relationships to the new CIT. For details, see Add/Remove Relationship Dialog Box.

    Note At this stage, you cannot yet view the federated data or populate the external data, as you have not yet defined the method for bringing in the data.

    Example of Creating a Containment Relationship:

    1. In the CIT Manager, select the two CITs:

       

    2. Create a Containment relationship between the two CITs: