Device Link Providers
A device link provider is a subscriber interface that gives a hook for adding context-specific html links (for example, the device links on the Device Details page). Zenpacklib provides a simple class to search the global catalog, device class catalog, or a device local catalog that match a specific query.
name: ZenPacks.zenoss.BasicZenPack link_providers: Virtual Machine: link_class: ZenPacks.example.XenServer catalog: device device_class: /Server/XenServer queries: [vm_id:manageIp] XenServer: global_search: True queries: [manageIp:vm_id]
To search the global catalog, set global_search to true. If the catalog you wish to search is in a specific device class, set global_search to false and specify the class name with device_class. To search a catalog on the local device, simply set global_search to false and do not set device_class. You can use one or more queries to match up devices/components. In the above example, the XenServer provider will search the global device catalog and match any device’s manageIp attribute with the current device’s vm_id attribute.
Device Link Provider Fields
The following fields are valid for a device link provider entry.
Name | Description | Required | Type | Default Value |
---|---|---|---|---|
link_title | Title which will appear on the overview page of the type of device or component. | yes | string | (implied from key in link_providers map) |
global_search | Search the global catalog? | no | boolean | false |
link_class | Python class on which this provider will apply. Requires full python class name. | no | string | Products.ZenModel.Device.Device |
device_class | Device class containing the catalog to search. | no | string | None |
catalog | Catalog name to search for linked devices or components. | no | string | device |
queries | Queries to use to match a linked device/component. Each query must be in remote:local format, meaning that the catalog search will match a remote attribute with a local attribute. The local search term could also be actual text. Examples: id:manageIp will match the remote id attribute with the local device’s manageIp attribute, and meta_type:ClusterDevice will match the meta_type on a remote device to “ClusterDevice”. | yes | list<string> | [] (empty list) |