Examples


The following paragraphs provide you with a number of examples for the previously explained tags. The examples are shown in two versions, once with keywords to be localized and once with hardcoded text if no localization is required. For information about how to localize your steps see the Localizing BCM to an Unsupported Language topic.

Example 1

The following is an excerpt of a script collecting values from an .ini file and placing these in the Custom Inventory, this parameter defines the path to the configuration file from which the value is to be recovered, using keywords:



<PARAM>
    <NAME>IniFilePath</NAME>
    <LABEL>_DB_STEPPARAM_INIFILEPATH_</LABEL>
    <TYPE>String</TYPE>
    <DEFAULT></DEFAULT>
</PARAM>
                

whereby IniFilePath is internal Chilli variable name for the DB_STEPPARAM_INIFILEPATH step label, the variable is of type string and does not have any preentered default value.

Following you can see the same example using hard coded text instead of keywords:



<PARAM>    
    <NAME>IniFilePath</NAME>
    <LABEL>File Path</LABEL>
    <TYPE>String</TYPE>
    <DEFAULT></DEFAULT>
</PARAM>
                

Example 2

The following parameter tag defines a drop-down list box from which a choice must be made:



<PARAM>    
    <NAME>Protocol</NAME>
    <LABEL>_DB_STEPPARAM_PROTOCOL_</LABEL>
    <TYPE>Enum</TYPE>    
    <ENUMGROUP>FirewallProtocol</ENUMGROUP>
    <ENUMTYPE>String</ENUMTYPE>    
    <ENUMVALUE>TCP, UDP</ENUMVALUE>
    <DEFAULT>TCP</DEFAULT>
</PARAM>
                

whereby Protocol is internal Chilli variable name for the DB_STEPPARAM_PROTOCOL step label, the ENUMGROUP defines that the parameter is to be found in the database in the FirewallProtocol column, the enumeration is of type String , its values are TCP and UDP and the prepopulated default value is the TCP protocol. Following you can see the same example using hard coded text instead of keywords:



<PARAM>    
    <NAME>Protocol</NAME>    
    <LABEL>Protocol</LABEL>    
    <TYPE>Enum</TYPE>    
    <ENUMGROUP>FirewallProtocol</ENUMGROUP>
    <ENUMTYPE>String</ENUMTYPE>    
    <ENUMVALUE>TCP, UDP</ENUMVALUE>    
    <DEFAULT>TCP</DEFAULT>
</PARAM>
                

Example 3

The following set of tags defines a list box in which a number of devices and device groups can be selected:



<PARAM>
    <NAME>Objects</NAME>    
    <LABEL>_DB_STEPPARAM_OBJECTOFTYPEDEVICEORDEVICEGROUP_</LABEL>
    <TYPE>ObjectType</TYPE>
    <OBJECTTYPE>_DB_OBJECTTYPE_DEVICE_</OBJECTTYPE>
    <OBJECTTYPEMEMBER>1</OBJECTTYPEMEMBER>
    <OBJECTTYPEGROUP>1</OBJECTTYPEGROUP>
    <OBJECTTYPENBOFITEMS>0</OBJECTTYPENBOFITEMS>    
    <DEFAULT/>
</PARAM>
                

whereby Objects is internal Chilli variable name for the DB_OBJECTTYPE_DEVICE step label, the list has no default object entered, individual objects, that is, devices , as well as group objects, that is, device groups , can be selected and the list is unlimited.

Following you can see the same example using hard coded text instead of keywords:



<PARAM>    
    <NAME>Objects</NAME>    
    <LABEL>Devices and/or Device Groups</LABEL>
    <TYPE>ObjectType</TYPE>
    <OBJECTTYPE>_DB_OBJECTTYPE_DEVICE_</OBJECTTYPE>
    <OBJECTTYPEMEMBER>1</OBJECTTYPEMEMBER>
    <OBJECTTYPEGROUP>1</OBJECTTYPEGROUP>
    <OBJECTTYPENBOFITEMS>0</OBJECTTYPENBOFITEMS>
    <DEFAULT/>
</PARAM>
                

Example of a complete XML File

The following example shows the code of an XML file as well as what the step looks like in the Console .

This is the code of the checkfiledate.xmlfile of the predefined step Check File Date :



<?xml version="1.0"?>
<STEPTYPE>
    <CLASS>_DB_STEPCLASS_MONITORING_</CLASS>
    <NAME>_DB_STEPNAME_CHECKFILEDATE_</NAME>
    <SCRIPT>checkfiledate.chl</SCRIPT>
    <NOTE>_DB_STEPNOTE_CHECKFILEDATE_</NOTE>
    <PARAMS>
        <PARAM>
            <NAME>FileName</NAME>
            <LABEL>_DB_STEPPARAM_FILENAME_</LABEL>
            <TYPE>String</TYPE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>CheckType</NAME>
            <LABEL>_DB_STEPPARAM_CHECKTYPE_</LABEL>
            <TYPE>Enum</TYPE>
            <ENUMGROUP>CheckType</ENUMGROUP>
            <ENUMTYPE>String</ENUMTYPE>
            <ENUMVALUE>ModificationDate, CreationDate</ENUMVALUE>
            <DEFAULT>CreationDate</DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>CheckDateRange</NAME>
            <LABEL>_DB_STEPPARAM_CHECKDATERANGE_</LABEL>
            <TYPE>Enum</TYPE>
            <ENUMGROUP>CheckDateRange</ENUMGROUP>
            <ENUMTYPE>String</ENUMTYPE>
            <ENUMVALUE>_DB_STEPPARAM_DATELESSTHAN_,_DB_STEPPARAM_DATEGREATERTHAN_,
            _DB_STEPPARAM_DATEEQUALORGREATERTHAN_,_DB_STEPPARAM_DATEEQUALORLESSTHAN_,_
            DB_STEPPARAM_DATEEQUAL_,_DB_STEPPARAM_DATENOTEQUAL_</ENUMVALUE>
            <DEFAULT>_DB_STEPPARAM_DATEEQUAL_</DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Year</NAME>
            <LABEL>_DB_STEPPARAM_YEAR_</LABEL>
            <TYPE>Integer</TYPE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Month</NAME>
            <LABEL>_DB_STEPPARAM_MONTH_</LABEL>
            <TYPE>Integer</TYPE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Day</NAME>
            <LABEL>_DB_STEPPARAM_DAY_</LABEL>
            <TYPE>Integer</TYPE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Hour</NAME>
            <LABEL>_DB_STEPPARAM_HOUR_</LABEL>
            <TYPE>Integer</TYPE>
            <OPTIONAL>true</OPTIONAL>
            <DEFAULTPRESENCE>false</DEFAULTPRESENCE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Minute</NAME>
            <LABEL>_DB_STEPPARAM_MINUTE_</LABEL>
            <TYPE>Integer</TYPE>
            <OPTIONAL>true</OPTIONAL>
            <DEFAULTPRESENCE>false</DEFAULTPRESENCE>
            <DEFAULT></DEFAULT>
        </PARAM>
        <PARAM>
            <NAME>Second</NAME>
            <LABEL>_DB_STEPPARAM_SECOND_</LABEL>
            <TYPE>Integer</TYPE>
            <OPTIONAL>true</OPTIONAL>
            <DEFAULTPRESENCE>false</DEFAULTPRESENCE>
            <DEFAULT></DEFAULT>
        </PARAM>
    </PARAMS>
</STEPTYPE>
                    

This is what the step looks like in the Console :xmlfile_example.pngxmlfile_example_pdf.png

Notice that all keywords in the code were replaced by their english translations. Verification Condition , Stop Condition and Notes . Parameters with different values for the TYPE elements are displayed in the following way:

  • String: a free text box
  • Boolean: a check box
  • Integer: a text box in which only numbers can be entered
  • Enum: a drop-down list with several options defined via the ENUMVALUE tag.
  • Optional: a check box before the actual data box, the DEFAULTPRESENCE parameter defines if it is checked by default.

 

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

BMC Client Management 12.2