Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Creating the Infrastructure Management cloud integrator


You can use the Infrastructure Management cloud integrator to quickly create cloud constructs that can be consumed by Infrastructure Management.

To create the cloud integrator:

  1. Obtain the codegen utility.
  2. Provide the name of the external cloud provisioning system whose construct will be consumed by Infrastructure Management.
  3. Run the codegen utility.
  4. Configure the Eclipse project.

Obtaining the codegen utility

You need to use the codegen utility to create the Infrastructure Management cloud integrator. Download this utility at

ftp://ftp.bmc.com/pub/BPPM/CodeGenUtil/BPPM-Cloud-integrator-code-gen-utility.zip.

Providing the name of the external cloud provisioning system

You can provide the name of the external cloud provisioning system in the cta.codegen.build.properties file located in the dist folder. This file contain two properties:

  • project.prefix: This value is used in a package name, or a configuration XML file name, or in the name of the external cloud provisioning system. It must be different from the name currently registered in the cloudadapter.xml file. 
  • output.source.dir: This property specifies the directory in which the codegen utility must generate the code.

For example, if your external cloud provisioning system is VMware vCloud, set the following values in the cta.codegen.build.properties file:

\##### Sample Properties files. Please modify according to your need
\####### Project Prefix #####
project.prefix=vcloud
\####### CAUTION - this directory would be deleted and re-created ##########
output.source.dir=./vcloudSrc

Running the codegen utility

After setting the values of project.prefix and output.source.dir in the cta.codegen.build.properties file, open a command prompt and go to the dist directory. Set the value of the JAVA_HOME variable to jdk home.

Execute run.cmd on the command line. If the command is successful, a template code is generated in the directory shown in the following figure. When you run the command, the vcloudsrc folder is created as shown in the figure. This folder contains the template that can be directly imported as a project in Eclipse Project.

codegen_command.png

Configuring Eclipse Project

  1. In Eclipse Project, click File > Import.
  2. Select General > Existing Projects into Workspace, and click Next.
    eclipse.png
  3. In the Import Projects dialog box, provide the location of the vcloudsrc directory as the root directory and click Finish.
    vcloudsrc.png

This imports the generated source code into Eclipse Project. The src directory contains all the required .jar files in the lib folder. The codegen utility also generates the XML files required by the cloud integrator in the conf folder.

importedjavaproject.png

Codegen generated files

After running the codegen utility and configuring the Eclipse project, the following folders and files are generated.

Folder or file

Details

lib

A folder that contains the caframework.jar and domain.jar files. These are the minimal required .jar files for the Infrastructure Management cloud integrator to compile.

conf

A folder that contains the generated XML files that are required by the cloud integrator:

  • CloudAdapter.xml: Contains the XML element block that is needed to register the adapter, copy the <adapter> tag block and paste it in the <adapter> tag block of the the CloudAdapter.xml file.
  • <adapter> DatahandlerMapping.xml: Used by the cloud integrator to build the handler factory. 
  • <adapter> DifferenceCalculation.xm: Used by the cloud integrator during the difference calculation.
  • template_log4j.properties

src

A folder that contains the actual source files generated for the cloud integrator. The source files generated are:

  • AdapterController.java: Located at src\com\bmc\sa\adapter-type. This class implements Interface ICloudAdapterController, which contains the lifecycle method for the adapter. You must modify the initialize() method to include its initialization. You can find the relevant method information in method comment.
  • AsyncDataHandler.java: Located at src\com\bmc\sa\adapter-type\handler\ adapter-type. The cloud integrator must use this class or its subclass to implement parallel or asynchronous execution.
  • InitializationDataHandler.java: Located at src\com\bmc\sa\adapter-type\handler. The cloud integrator must use this handler to execute the difference calculation.

Related topics

Sample of the DatahandlerMapping.xml file

Sample of the log4j.properties file

Sample of the AdapterController.java class

Handlers

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*