Plugin Provider¶
A PluginProvider describes the capabilities of a plugin binary that can be instantiated as one or more Plugins. The object is read-only and is populated automatically when the plugin provider binary is uploaded to DRP. Removing the provider does not remove its embedded content but does invalidate any running Plugin instances.
The Version field carries the provider's semver version string.
PluginVersion indicates the plugin API protocol version (currently all
providers must use version 4). When AutoStart is true, DRP automatically
creates a Plugin instance for this provider at load time if one does not
already exist.
AvailableActions lists the actions this provider can perform (each
specifying a target Model, Command name, and required/optional parameters).
RequiredParams and OptionalParams define the parameters a Plugin
instance needs or can accept. The StoreObjects map allows the provider to
define custom object types with JSON Schema validation that DRP will store
on its behalf.
The Content field may contain an embedded YAML content bundle that DRP
extracts and loads as a content layer. The IgnoreEvents flag, when true,
tells DRP that this provider does not publish or consume events; if
AvailableActions is also empty the provider is started only briefly to
extract its definition and assets rather than running a long-lived process.
Fields¶
| Field | Definition |
|---|---|
| AutoStart | If AutoStart is true, a Plugin will be created for this Provider at provider definition time, if one is not already present. |
| AvailableActions | AvailableActions lists the actions that this PluginProvider can take. |
| AvailableActions/Command | Command is the action name |
| AvailableActions/Model | Model is the type of object this action should apply. |
| AvailableActions/OptionalParams | OptionalParams is a list of parameters that can alter the behavior of this action. |
| AvailableActions/Provider | Provider is the name of the provider that provides this action. |
| AvailableActions/RequiredParams | RequiredParams is a list of parameters that are required for this action. |
| Content | Content Bundle Yaml string - can be optional or empty |
| Documentation | Documentation of this plugin provider. This should tell what the plugin provider is for, any special considerations that should be taken into account when using it, etc. in rich structured text (rst). |
| HasPublish | HasPublish is deprecated, plugin provider binaries should use a websocket event stream instead. |
| IgnoreEvents | IgnoreEvents should be set to true if this plugin provider will not publish or respond to events. If this is true and AvailableActions is empty, then the plugin provider will only be started to get its definition and extract assets. It will not run a long-running sub process. |
| Meta | Meta contains the meta data of the object. The type of this field is a key / value map/dictionary. The key type is string. The value type is also string. The general content of the field is undefined and can be an arbritary store. There are some common known keys: color - The color the UX uses when displaying icon - The icon the UX uses when displaying * title - The UX uses this for additional display information. Often the source of the object. Specific Object types use additional meta data fields. These are described at: https://docs.rackn.io/stable/redirect/?ref=rs_object_metadata |
| Name | Name is the unique name of the PluginProvider. Each Plugin provider must have a unique Name. |
| OptionalParams | OptionalParams are Params that can be present on a Plugin for the Provider to operate. This is used to ensure default parameters are available. |
| PluginVersion | This is used to indicate what version the plugin is built for This is effectively the API version of the protocol that plugin providers use to communicate with dr-provision. Right now, all plugin providers must set this to version 4, which is the only supported protocol version. |
| RequiredParams | RequiredParams are Params that must be present on a Plugin for the Provider to operate. |
| StoreObjects | Object prefixes that can be accessed by this plugin. The interface can be empty struct{} or a JSONSchema draft v4 This allows PluginProviders to define custom Object types that dr-provision will store and check the validity of. |
| Version | The version of the PluginProvider. This is a semver compatible string. |