The Adapter Development Cycle

The following illustration shows a flowchart for adapter writing. Most of the time is spent in the middle section, which is the iterative loop of development and testing.

Each phase of adapter development builds on the last one.

Once you are satisfied with the way the adapter looks and works, you are ready to package it. Using either the UCMDB Package Manager or manual exporting of the components, create a package *.zip file. As a best practice, you should deploy and test this package on another UCMDB system before releasing it to production, to ensure that all the components are accounted for and successfully packaged. For details on packaging, see Package Manager.

The following sections expand on each of the phases, showing the most critical steps and best practices:

Research and Preparation Phase

The Research and Preparation phase encompasses the driving business needs and use cases, and also accounts for securing the necessary facilities to develop and test the adapter.

  1. When planning to modify an existing adapter, the first technical step is to make a backup of that adapter and ensure you can return it to its pristine state. If you plan to create a new adapter, copy the most similar adapter and save it under an appropriate name. For details, see Resources Pane.

  2. Research the method which the adapter should use to collect data:

    • Use external tools/protocols to obtain the data

    • Develop how the adapter should create CIs based on the data

    • You now know what a similar adapter should look like

  3. Determine most similar adapter based on:

    • Same CIs created

    • Same Protocols used (SNMP)

    • Same kind of targets (by OS type, versions, and so on)

  4. Copy the entire package.

  5. Unzip the package contents into the work space and rename the adapter (XML) and Jython (.py) files.

Adapter Development and Testing

The Adapter Development and Testing phase is a highly iterative process. As the adapter begins to take shape, you begin testing against the final use cases, make changes, test again, and repeat this process until the adapter complies with the requirements.

Startup and Preparation of Copy

  • Modify XML parts of the adapter: Name (id) in line 1, Created CI Types, and Called Jython script name.

  • Get the copy running with identical results to the original adapter.

  • Comment out most of the code, especially the critical result-producing code.

Development and Testing

  • Use other sample code to develop changes

  • Test adapter by running it

  • Use a dedicated view to validate complex results, search to validate simple results

Adapter Packaging and Productization

The Adapter Packaging and Productization phase accounts for the last phase of development. As a best practice, a final pass should be made to clean up debugging remnants, documents, and comments, to look at security considerations, and so on, before moving on to packaging. You should always have at least a readme document to explain the inner workings of the adapter. Someone (maybe even you) may need to look at this adapter in the future and will be aided greatly by even the most limited documentation.

Cleanup and Document

  • Remove debugging

  • Comment all functions and add some opening comments in the main section

  • Create sample TQL and view for the user to test

Create Package

  • Export adapters, TQL, and so on with the Package Manager. For details, see Package Manager.

  • Check any dependencies your package has on other packages, for example, if the CIs created by those packages are input CIs to your adapter.

  • Use Package Manager to create a package zip. For details, see Package Manager.

  • Test deployment by removing parts of the new content and redeploying, or deploying on another test system.