Creating Data Model Help with the cdm2html utility
BMC Atrium CMDB comes with Data Model Help that describes the classes and attributes (hidden and non-hidden) in the Common Data Model (CDM). This help is generated from a live BMC Atrium CMDB data model by using the cdm2html utility. If you install other BMC products that extend the BMC Atrium CMDB data model or if you add classes or attributes yourself, the Data Model Help no longer reflects the actual data model. The cdm2html utility enables you to update the Data Model Help to reflect the current data model.
The cdm2html utility creates an HTML-based help system that provides information about the data model, including class inheritance, attributes, and characteristics such as whether a class is abstract or a categorization class.
This help includes the descriptions found in the BMC Atrium CMDB Class Manager in the Class Description field for classes and the Description field for attributes. If you have created new classes or attributes, enter meaningful descriptions for them in the Class Manager before running cdm2html.
The cdm2html utility is a BMC Atrium CMDB Java API client, and requires the following software:
- Java Runtime (J2SE) version 1.7 or later.
- Apache Xalan-Java version 2.7 or later. This is bundled with BMC Atrium CMDB and installed in <cmdbInstallDir>\cmdb\utils.
- Prerequisites for BMC Atrium CMDB Java API and BMC Remedy AR System Java API clients as listed in the JavaAPI_Overview.html file of the BMC Atrium CMDB Javadoc Help.
The cdm2html utility is subject to these restrictions:
- It can be used only with a BMC Atrium CMDB that has English as its data language.
- It does not delete help files. If you delete a class from the data model and then run cdm2html, the previously existing HTML file for that class remains untouched. You should always generate Data Model Help into a new folder or clean out the existing folder before generating.
cdm2html.bat file ( Microsoft Windows)
On Windows, you can avoid typing the extensive
CLASSPATH information by invoking the
cdm2html utility from a wrapper batch file, cdm2html.bat. Before running the batch file, you must set these system variables:
JAVA_HOME— Set to your Java installation directory, such as C:\Program Files\Java\jre7
CMDBSDK— Set to your BMC Atrium CMDB SDK installation directory, such as C:\Program Files\BMC Software\AtriumCore\cmdb\sdk\bin
The batch file is located in <cmdbInstallDir>\cmdb\utils. Its parameter syntax is the same as for the direct Java command. Here is an example command:
cdm2html.bat -server localhost -user Demo -port 0 -password "" -outdir C:\TEMP -attributes visible
After running the utility, the
outdir directory contains a zipped version of the help and an HTML folder containing the unzipped help.
cdm2html Java command syntax
This section explains how to directly invoke cdm2html with a Java command from a Microsoft Windows or UNIX command prompt. You must either add the following paths and files to your
CLASSPATH environment variable before running cdm2htm or include the
-cp parameter at runtime to specify them:
The command syntax is:
] com.bmc.cmdb.cdmutil.cdm2html -indir
-server HostName -user
The parameters are:
-indir— The path where cdmutil.jar resides. By default, this file is installed in <cmdbInstallDir>\cmdb\utils. If you specify a relative path, it must begin with a period (.) and be relative to the directory from which you are executing the command.
-outdir— The path in which to generate the help files. If you specify a relative path, it must begin with a period (.) and be relative to the directory from which you are executing the command. The default is the current directory.
-server— The BMC Atrium CMDB server from which you want to export Data Model Help. You can specify either a host name or IP address. The default value is localhost.
-user— The BMC Remedy AR System user to perform the operation. The default value is
Demo. You must have the CMDB Definitions Viewer role.
password— The password for this user. The default value is blank.
-port— The port number on which to connect to the server. The default value is 0, which means to use the BMC Remedy AR System portmapper.
-attributes <visible|all>— The CDM attributes to display. This parameter is optional. The default value is
visible, which means only non-hidden attributes are displayed. If you include
-attributes all, all the attributes (non-hidden and hidden) are displayed.
Here is an example command at the <cmdbInstallDir>\cmdb\utils prompt on a Window 64-bit computer, assuming that you did not add anything to the CLASSPATH:
java -cp "C:\Program Files\BMC Software\AtriumCore\CMDB\utils\;C:\Program Files\BMC Software\AtriumCore\CMDB\utils\cdmutil.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\sdk64\bin\cmdbapi81.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\utils\xalan.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\sdk64\bin\arapi81_build001.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\sdk64\bin\commons-lang-2.4.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\sdk64\bin\log4j-1.2.14.jar;C:\Program Files\BMC Software\AtriumCore\CMDB\sdk64\bin" com.bmc.cmdb.cdmutil.cdm2html -outdir .HTMLHelp -indir "C:\Program Files\BMC Software\AtriumCore\CMDB\utils" -user Demo -password ""
After running the utility, the outdir directory contains a zipped version of the help and an HTML folder containing the unzipped help.