Generating Help for the data model by using the cdm2html utility


BMC Helix CMDB comes with Data Model Help that describes the classes and attributes (hidden and non-hidden) in Common Data Model (CDM). The PDFs-and-videos page contains a CDM Help that corresponds to the data model that is default for a CMDB installation. However, if you install other BMC products that extend the BMC Helix CMDB data model, or if you add classes or attributes manually, the Data Model Help no longer reflects the actual data model. In such a scenario, you can run the cdm2html utility to generate the CDM Help from a live BMC Helix CMDB 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 an abstract or a categorization class. This help includes the descriptions found in Class Manager in the Class Description field for classes and the Description field for attributes. 

Best practice
If you have created new classes or attributes, you must enter meaningful descriptions for them in Class Manager before running cdm2html.

Before you begin

You must perform a few checks and configurations before you can run the cdm2html utility.

Software requirements

The cdm2html utility is a BMC Helix CMDB Java API client, and requires the following software:

  • Java Runtime (J2SE)
  • Apache Xalan-Java. This is bundled with BMC Helix CMDB and installed in <cmdbInstallDir>\cmdb\utils.
  • Prerequisites for BMC Helix CMDB Java API and AR System Java API clients as listed in the JavaAPI_Overview.html file of the BMC CMDB Javadoc Help.

Restrictions

The cdm2html utility is subject to these restrictions:

  • It can be used only with a BMC Helix 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 the help files.

Settings for Microsoft Windows

In 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 Helix 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 that of the direct Java command. 

Settings before running Java command on Microsoft Windows or UNIX

Before you use a Java command from a Microsoft Windows or UNIX command prompt, you must add any of the following paths and files to your CLASSPATH environment variable before running cdm2htm:

<cmdbInstallDir>\cmdb\utils

<cmdbInstallDir>\cmdb\utils\cdmutil.jar

<cmdbInstallDir>\cmdb\utils\xalan.jar

<cmdbInstallDir>\cmdb\sdk64\bin\cmdbapi90.jar

<cmdbInstallDir>\cmdb\sdk64\bin\arapi90_build001.jar

<cmdbInstallDir>\cmdb\sdk64\bin\commons-lang-2.4.jar

<cmdbInstallDir>\cmdb\sdk64\bin\arlogger.jar

To generate Help for the data model by using the cdm2html utility

  1. Log in to the computer on which BMC Helix CMDB is installed.
  2. Go to <cmdbInstallDir>\cmdb\utils
  3. Open Command Prompt.
  4. Type one of the following commands to generate the CDM Help:
    (Windows) cdm2html.bat -server localhost -user Demo -port 0 -password "" -outdir C:\TEMP -attributes visible 
    (UNIX) java [-cpPath] com.bmc.cmdb.cdmutil.cdm2html <indirPath> <outdirPath> <HostName> <UserName> "<password>" <portNumber>

    The zipped version of the help is saved in the outdir directory, and the unzipped version of the help is saved in an HTML folder.

Examples

The following example commands show the syntax for various scenarios.

Batch file from the Microsoft Windows command prompt

The following example is for running the cdm2html.bat file from a window command prompt if you have added values to the CLASSPATH variable as described in the prerequisites:

cdm2html.bat <HostName> <UserName> "<password>" <portNumber> C:\TEMP -attributes visible 

Java command from the Microsoft Windows or UNIX command prompt

  • Example command for cdm2html.bat file

Include the -cp parameter at runtime to specify the paths by using the following command syntax:
java [-cpPath] com.bmc.cmdb.cdmutil.cdm2html <HostName> <UserName> "<password>" <portNumber>

The parameters in the command are as follows:

Parameter

Description

indir 

The path where cdmutil.jar resides. By default, this file is installed in <cmdbInstallDir>\cmdb\utils. If you want to specify a relative path, ensure that you begin the path with a period (.), and it is relative to the directory from which you are executing the command.

outdir 

The path in which to generate the help files. If you want to specify a relative path, ensure that you begin the path with a period (.), and it is relative to the directory from which you are executing the command. The default is the current directory.

server 

BMC Helix CMDB server from which you want to export Data Model Help. You can specify either a host name or an IP address. The default value is localhost.

username 

The AR System user who performs the operation. The default value is Demo. The user must have the CMDB Definitions Viewer role.

password 

The password for the user. The default value is blank.

port 

The port number on which to connect to the server. The default value is 0, which means the AR System portmapper must be used.

attributes <visible|all>

The CDM attributes to be displayed. 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.

  • 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 ""


 

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