4.0

Table Of Contents
Policies can implement either gauges or triggers to monitor objects in the plugged-in technology. Policy gauges
monitor the attributes of objects and push an event in the Orchestrator server if the values of the objects exceed
certain limits. Policy triggers monitor objects and push an event in the Orchestrator server if a defined event
occurs on the object. You register policy gauges and triggers with IPluginEventPublisher instances so that
Orchestrator policies can monitor them.
The IPluginEventPublisher Interface defines the following methods.
Type Returns Description
pushGauge(java.lang.String type,
java.lang.String id,
java.lang.String gaugeName,
java.lang.String deviceName,
java.lang.Double gaugeValue)
Void Publish a gauge for policies to monitor. Takes the following
parameters:
n
type: Type of the object to monitor.
n
id: Identifier of the object to monitor.
n
gaugeName: Name for this gauge.
n
deviceName: Name for the type of attribute that the gauge
monitors.
n
gaugeValue: Value for which the gauge monitors the object.
pushTrigger(java.lang.String type,
java.lang.String id,
java.lang.String triggerName,
java.util.Properties
additionalProperties)
Void Publish a trigger for policies to monitor. Takes the following
parameters:
n
type: Type of the object to monitor.
n
id: Identifier of the object to monitor.
n
triggerName: Name for this trigger.
n
additionalProperties: Any additional properties for the
trigger to monitor.
IPluginFactory Interface
The IPluginAdaptor returns IPluginFactory instances. IPluginFactory instances run commands in the
plugged-in application, and finds objects upon which to perform Orchestrator operations.
The IPluginFactory interface defines the following field:
static final java.lang.String RELATION_CHILDREN
The IPluginFactory interface defines the following methods.
Method Returns Description
executePluginCommand(java.lang.String
cmd)
Void Use the plug-in to run a command. VMware
recommends that you do not use this method.
find(java.lang.String type,
java.lang.String id)
java.lang.Object
Use the plug-in to find an object. Identify the
object by its ID and type.
findAll(java.lang.String type,
java.lang.String query)
QueryResult
Use the plug-in to find objects of a certain
type and that match a query string. You
define the syntax of the query in the
IPluginFactory implementation of the
plug-in. If you do not define query syntax,
findAll() returns all objects of the specified
type.
findRelation(java.lang.String
parentType, java.lang.String parentId,
java.lang.String relationName)
java.util.List
Determines whether an object has children.
hasChildrenInRelation(java.lang.String
parentType, java.lang.String parentId,
java.lang.String relationName)
HasChildrenResult
Finds all children related to a given parent by
a certain relation.
Chapter 7 Developing Plug-Ins
VMware, Inc. 219