Important

   

Starting version 8.9.03, BMC Network Automation is renamed to TrueSight Network Automation. This space contains information about BMC Network Automation 8.9.02 and previous versions. For TrueSight Network Automation 8.9.03 and later releases, see the TrueSight Network Automation documentation.

Developing a device type adapter

A device type device adapter defines how BMC Network Automation interacts with one model or flavor of a networking equipment. A device type is the most complex device adapter. The XML syntax supports a wide variety of devices exhibiting all sorts of unusual behaviors, built up over years of exposure to networking equipment. This topic describes sections in a device type adapter and XML template for CLI based adapters.

Device type adapter basics

Create a new device type adapter if your network includes devices that are not supported by the factory-installed adapters and your analysis of the device shows that it is suitable to be managed by BMC Network Automation. You might also find that a factory-installed adapter needs to be tweaked to work properly with a model found in your network, requiring you to gain some familiarity with the adapter syntax.

Creating a new device type can be challenging. The concept is simple, especially for a command line or CLI based device, where you develop interactions that send commands like a user would during a Telnet session, and read responses which indicate that the command is successful, implementing the basic snapshot action to get the running configuration. But analysis is required prior to starting to code, where you investigate what a device is capable of doing, and decide how complete your device type needs to be to support your operations. See Analysis of a new device type for more information.

You can create a device type adapter from scratch. However, BMC recommends that you start either from a template (provided in the sections that follow), or from an existing adapter shipped with the system (such as the Riverbed Steelhead Appliance, which is relatively straightforward CLI based; or SonicWALL Firewall, which is HTTP based). You can export the baseline adapter and then edit it according to your requirements. The other baseline adapters can provide examples of more complicated features; everything a device type adapter can do is represented somewhere in the baseline. You can export all of the baseline adapters to a single file and search that single file to find examples of the XML elements you want to use.

Sections in a device type adapter

A device type can be divided into two parts:

  • The header part, containing various settings that control behavior. Each element is described in Device type header XML element reference.
  • The device interaction part, containing logic similar to a programming language for executing commands or requests on the device. This part can further be divided into these types of commands:
    • Interactions for a command-line based interface, where the system mimics a human typing commands and reading responses. Each element is described in Device type CLI interaction XML element reference.
    • Interactions for an HTTP or HTTPS based interface, where the system mimics a web browser or implements a web services API client. Each element is described in Device type HTTP interaction XML element reference.
    • Interactions for some other type of protocol based interface, where the system implements a client program. The XML contains <javaDeviceCommand> elements which refer to a Java method present in the factory-installed system. Since this is for BMC use only and is not user-extensible, it will not be discussed any further.

Back to top

Template for a basic CLI based adapter

Use the following simplified or skeletal template for the XML for a device type adapter, containing a basic starting point for a new CLI based device type that has only a running configuration.

Skeletal template

Template for a complicated CLI based adapter

Use the following template for the XML for a more complicated or fully-realized device type adapter, for the header part and the basic shell for the interaction part for a CLI based device type. Delete any <deviceCommand> you do not need to support; you can add it back in later, if needed.

Note

For an HTTP based device type, use this template, but replace <deviceCommand> with <httpDeviceCommand>

Full template

Back to top

Comments in templates and baseline adapters

The templates and the baseline adapters include comments to indicate which device command is doing what (since the GUIDs are not useful as documentation). These comments might not make sense to you, as they use terminology not normally exposed to end users. They are used for historical reasons by the development team. The following table briefly explains these comments:

CommentExplanation
discover coreExecuted after the login to discover core or basic information about the device, such as model and operating system version
copy running to netTake a snapshot of the running configuration, which copies the running configuration to BMC Network Automation ("net")
copy startup to netTake a snapshot of the startup configuration, which copies the startup configuration to BMC Network Automation ("net")
copy net to running

Deploy a script into the running configuration, which copies a script from BMC Network Automation ("net")

copy net to startupDeploy a script into the startup configuration, which copies a script from BMC Network Automation ("net")
copy running to startupCommit unsaved changes, which typically saves what is active (running) to what is stored (startup)
copy image to netTake a snapshot of the current operating system image, which copies the image to BMC Network Automation ("net")
copy net to imageDeploy a new operating system image, which copies an image from BMC Network Automation ("net")
Was this page helpful? Yes No Submitting... Thank you

Comments