Documentation forKiwi CatTools

Custom devices in Kiwi CatTools

CatTools provides the ability to create custom device types and script files, should your device not be supported by one of the predefined device types.

An understanding of and experience in Visual Basic scripting is required in order to successfully add custom scripts to CatTools. The sample code template files found the /Templates sub folder of the CatTools root directory provides help file documentation and comments for adding custom devices.

To add support for a custom device in CatTools, two fields are required:

  1. The device type .ini file, which defines:
    • The device type name
    • The device ID
    • The user interface field values and default values which are displayed in the device form when adding or editing a device
  2. The device script .txt file, which contains:
    • The device type's specific code to allows CatTools to log in to the device
    • Enter and exit different modes,
    • Activities to be performed - such as configuration backups, sending CLI commands, modifying device configurations
    • Parse command output data for reports

The device script file also contains function calls and references to variables within the internal CatTools program code. These are prefixed with cl.

For a list of cl. functions and variables, see cl. variables and functions. These functions and variables can be used to develop your custom device script.

Create a custom device

The custom device template files provides by CatTools and referenced below are based on a Cisco Router device. Additional modifications to the device script .txt file are required once you have created it to customize the script to work successfully with your specific device.

For further information regarding customizing devices see:

1. Create a custom device type .ini file

  1. Copy the Custom.Device.Template.ini file located in the \Program Files (x86)\CatTools3\Templates sub folder of the CatTools root directory.
  2. Save the copy to the \Program Files (x86)\CatTools3\Devices sub folder
  3. Enter a new file name using the syntax Custom.[Manufacturer].[DeviceType].
    For example, Custom.Cisco.FirewallPIX.

2. Edit the .ini file

  1. Using a text file editor, such as Notepad, open the .ini file created in step 1.
  2. Change the following default values in the .ini file:

    [device]

    name=Custom.[Manufacturer].[Type]

    id=4000

    • Change name to a unique device name. For example: Custom.Cisco.Router

      Do not use spaces. Use a period (.) instead.

    • Change id to a unique number that is not being used by any other device .ini file.

      The number must be within the range of 4000 to 4999.

    [item_Name]

    default= Unique device name

3. Save and restart CatTools

  1. After completing changes to the .ini file, save it to the \Devices sub folder and close.
  2. Restart CatTools to populate the Device type drop-down field. Your custom device type is now available in the device setup screen.

4. Create a custom device .txt script file

  1. Make a copy of the Custom.Device.Template.txt file located in the \Templates sub folder of the CatTools root directory.
  2. Save the copy of the file to the \Program Files (x86)\CatTools3\Scripts sub folder. Save the file using the value entered for [device] name in Step 2.

    Ensure you retain the .txt file type suffix.

    For example, if in the device .ini file settings, [device] name=Custom.Cisco.FirewallPIX, the script .txt file name must therefore be: Custom.Cisco.FirewallPIX.txt.

5. Edit the .txt file

  1. Using a text file editor, open the .txt file create in step 4.
  2. Follow the instructions under the SCRIPT NOTES section of the .txt template to customize the script for your device.

    Although you can open .txt files using NotePad, a syntax highlighting script editor can make reading and editing the file easier.

6. Save and text

  1. After you have made your edits to the .txt file, save the file to the \Scripts sub folder and close.
  2. To test your custom device, create an activity in CatTools that is supported by your custom device script. Run it manually using the Run Now button.
    Using Device.ConnectivityTest.Login is recommended for testing since every device must be able to log in successfully to perform other activities.
  3. Check the Info Log pane for errors and edit your .txt file as necessary.

See Testing your custom device for more information and tips.