Importing device adapters
This topic provides instructions on importing a device adapter.
To learn about the states of a device adapter and various types of device adapters available in Managing-device-adapters.
, seeIn addition to the built-in device adapters provided by rules that apply to device adapter definition files and validate the device type adapters.
, you can import new adapter files. Ensure that you follow theYou can also re-import an existing device adapter after modifying it. Re-importing is possible for the following types of device adapters:
- Device Type
- Configuration Trail (except Running/Startup)
- Custom Action
- External Script Action
Importing a device adapter
Log on to the application server with a user having administrator privileges on the server, and on the Admin > Network Admin > Device Adapters page, click Import and do the following:
In the Import dialog box, click Attach file, and then select the file, or drag and drop the file to be imported.
- (Optional) If you want the newly-added adapters to be enabled following the import, select the Enable New Device Adapters option. Otherwise, new adapters start out as disabled. Existing adapters are not affected.
- Click Import. The file is imported and scanned for errors. Error messages are displayed in the user interface.
If the import is successful a User type event is logged with the name of the adapter being imported. If the adapter is enabled by default, it becomes available to users.
After a successful import
If you have imported changes to an existing device type, you might need to perform a Refresh Device Status action on the devices of that device type. If you modify the <supportedTrail> elements such that you remove one or more trails, your devices might contain stale information from the trails you removed. This includes configurations, discrepancies, compliance violations, and values from the configuration-profiled dynamic fields. When you perform a refresh, the stale configurations are deleted, and the discrepancies and violations based on those configurations are cleared, and the profiled dynamic field values extracted from the stale configurations are removed.
Rules that apply to device adapter definition files
- The XML code must conform to the schema defined in the DeviceTypeMap.xsd file that is located in the following directory:
BCAN_HOME\public\bmc\bca-networks\xml - Each adapter must have a unique GUID. To generate a new GUID, use the create_guid.sh or create_guid.bat script in the BCAN_HOME/tools directory.
If you import an adapter file with the same GUID as an existing adapter, the imported file replaces the current adapter. - Each adapter of the same type (Vendor, Device Type, Custom Action, Configuration Trail, or External Script Action) must have a unique name.
Validation of device type adapters
When you import a new or modified device type adapter,
validates the XML and also performs the following validations:- Supported trail declarations must contain a reference to a valid trail GUID.
- Snapshot, Deploy to Active, and Deploy to Stored command GUIDs must have a corresponding implementation in the imported definition. (Snapshot, Deploy to Active, or Deploy to Stored commands pointing to a custom action are not required to have an implementation in the imported definition).
- The imported definition must have implementations for the following commands:
- Login
- Discover Core
- Logout
- Reboot
Related topics
Developing-a-custom-action-adapter-using-XML
Modifying device adaptersExporting device adaptersTesting-considerations-when-adding-a-device-type