Developing a configuration trail adapter
A configuration refers to a collection or group of settings or operating parameters that control the behavior or functioning of a device. The system obtains a configuration from a device during snapshot actions, and makes changes to the configuration during deploy actions. This topic describes configuration trail adapter basics and XML template for a configuration trail adapter.
Configuration trail adapter basics
A configuration trail refers to a sequence of configurations of the same kind, archived over time, representing the history of changes detected by the system. The newest configuration within a given trail is known as the current configuration. Older configurations are known as historical configurations.
Configuration trails can be in ASCII or binary format. Some devices allow decoding of their binary configurations for display purposes. If a decoder program or script exists, it can be added to the system to allow the system to perform the decoding automatically. If a decoder program does not exist, logic can be added to the device type adapter that captures the output of a command (or number of commands) and that output can be used as the decoded contents of the binary file.
A configuration trail adapter defines the unique GUID, name, format, and other characteristics of a configuration trail. You then implement support for the trail in the applicable device type adapter. You inform the device type that the trail is supported using the
<supportedConfigurationTrailDeclarations> elements, and then you add the
<httpDeviceCommand> elements that perform snapshot and deploy actions.
Create a new trail if there is additional data you want to collect from a device, where keeping a history of that data is important (such as to support reverting to an old version of the settings).
XML template for a configuration trail adapter
Use this template for the XML for a configuration trail adapter:
<?xml version="1.0" encoding="UTF-8"?> <deviceTypeMap> <configurationTrailDeclarations> <trail> <guid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</guid> <sortOrder>0</sortOrder> <name>display name</name> <supportsTrusted>false</supportsTrusted> </trail> </configurationTrailDeclarations> </deviceTypeMap>
The legal XML elements in a configuration trail adapter are:
(Required) A globally unique ID (GUID)
Run the create_guid.sh or create_guid.bat script in the BCAN_HOME\tools directory to generate a new GUID for use here.
Number indicating where this trail appears among other trails in the system, whenever the GUI displays a list of more than one configuration trail name.
It is also used during snapshot and deploy actions to order the trails consistently.
(Required) Name of the trail, up to 255 characters in length
This name appears on the GUI and must be unique across all configuration trails.
Indicates whether the system maintains a trusted configuration in this trail
Valid values are