4.1
- vCenter Orchestrator Developer's Guide
- Contents
- Updated Information
- About This Book
- Introduction to VMware vCenter Orchestrator
- Developing Workflows
- Principal Phases in the Workflow Development Process
- Accessing the Orchestrator Client
- Testing Workflows During Development
- Workflow Editor
- Provide General Workflow Information
- Defining Attributes and Parameters
- Workflow Schema
- Obtaining Input Parameters from Users When a Workflow Starts
- Requesting User Interactions While a Workflow Runs
- Add a User Interaction to a Workflow
- Set the User Interaction security.group Attribute
- Set the timeout.date Attribute to an Absolute Date
- Calculate a Relative Timeout for User Interactions
- Set the timeout.date Attribute to a Relative Date
- Define the External Inputs for a User Interaction
- Define User Interaction Exception Behavior
- Create the Input Parameters Dialog Box for the User Interaction
- Respond to a Request for a User Interaction
- Calling Workflows Within Workflows
- Running a Workflow on a Selection of Objects
- Developing Long-Running Workflows
- Configuration Elements
- Workflow User Permissions
- Validating Workflows
- Running Workflows
- Develop a Simple Example Workflow
- Create the Simple Workflow Example
- Define the Simple Workflow Example Parameters
- Create the Simple Workflow Example Schema
- Link the Simple Workflow Example Elements
- Create Workflow Zones
- Define the Simple Workflow Example Decision Bindings
- Bind the Simple Workflow Example Action Elements
- Bind the Simple Workflow Example Scripted Task Elements
- Define the Simple Example Workflow Exception Bindings
- Set the Simple Workflow Example Attribute Read-Write Properties
- Set the Simple Workflow Example Parameter Properties
- Set the Layout of the Simple Workflow Example Input Parameters Dialog Box
- Validate and Run the Simple Workflow Example
- Develop a Complex Workflow
- Create the Complex Workflow
- Define the Complex Workflow Example Input Parameters
- Create a Custom Action For the Complex Workflow Example
- Create the Complex Workflow Example Schema
- Link the Complex Workflow Example Schema Elements
- Create the Complex Workflow Example Zones
- Define the Complex Workflow Example Bindings
- Set the Complex Workflow Example Attribute Properties
- Create the Layout of the Complex Workflow Example Input Parameters
- Validate and Run the Complex Workflow Example
- Developing Actions
- Scripting
- Orchestrator Elements that Require Scripting
- Limitations of the Mozilla Rhino Implementation in Orchestrator
- Using the Orchestrator API
- Access the Scripting Engine from the Workflow Editor
- Access the Scripting Engine from the Action or Policy Editor
- Access the Orchestrator API Explorer
- Use the Orchestrator API Explorer to Find Objects
- Writing Scripts
- Add Parameters to Scripts
- Accessing the Orchestrator Server File System from JavaScript and Workflows
- Accessing Java Classes from JavaScript
- Accessing Operating System Commands from JavaScript
- Exception Handling Guidelines
- Orchestrator JavaScript Examples
- Creating Resource Elements
- Creating Packages
- Developing Plug-Ins
- Overview of Plug-Ins
- Contents and Structure of a Plug-In
- Create an Orchestrator Plug-In
- Accessing the Orchestrator Plug-In API
- Obtain an Application to Plug in to Orchestrator
- Components of the Solar System Application
- Components of the Solar System Plug-In
- Create a Plug-In Factory
- Set Up the Plug-In Factory Implementation
- Set Up Event Listeners and Notification Handlers
- Find Objects By Identifier in the Plugged-In Technology
- Find Objects in the Plugged-In Technology By a Query
- Find Objects By Relation Type in the Plugged-In Technology
- Discover Whether an Object has Children of a Given Relation Type
- Create a Plug-In Event Listener
- Create a Plug-In Event Generator
- Create a Plug-In Workflow Trigger
- Create Plug-In Watchers
- Define Objects and Methods to Map to the Orchestrator JavaScript API
- Create a Plug-In Adapter
- Add a Tab to the Configuration Interface
- Map the Application in the vso.xml File
- Create the Plug-In DAR Archive
- Install a Plug-In in the Orchestrator Server
- Interact with the Solar System Application by Using Orchestrator
- Orchestrator Plug-In API Reference
- IAop Interface
- IConfigurationAdaptor Interface
- IDynamicFinder Interface
- IPluginAdaptor Interface
- IPluginEventPublisher Interface
- IPluginFactory Interface
- IPluginNotificationHandler Interface
- IPluginPublisher Interface
- WebConfigurationAdaptor Interface
- BaseAction Class
- ConfigurationError Class
- Localizator Class
- PluginLicense Class
- PluginTrigger Class
- PluginWatcher Class
- QueryResult Class
- SDKFinderProperty Class
- SDKHelper Class
- PluginExecutionException Class
- PluginLicenseException Class
- PluginOperationException Class
- ConfigurationError.Severity Enumeration
- ErrorLevel Enumeration
- HasChildrenResult Enumeration
- ScriptingAttribute Annotation Type
- ScriptingFunction Annotation Type
- ScriptingParameter Annotation Type
- Elements of the vso.xml Plug-In Definition File
- module Element
- configuration Element
- description Element
- deprecated Element
- url Element
- installation Element
- action Element
- webview-components-library Element
- finder-datasources Element
- finder-datasource Element
- inventory Element
- finders Element
- finder Element
- properties Element
- property Element
- relations Element
- relation Element
- id Element
- inventory-children Element
- relation-link Element
- events Element
- trigger Element
- trigger-properties Element
- trigger-property Element
- gauge Element
- scripting-objects Element
- object Element
- constructors Element
- constructor Element
- Constructor parameters Element
- Constructor parameter Element
- attributes Element
- attribute Element
- methods Element
- method Element
- example Element
- code Element
- Method parameters Element
- Method parameter Element
- singleton Element
- enumerations Element
- enumeration Element
- entries Element
- entry Element
- Developing a Web Services Client
- Writing a Web Service Client Application
- Process for Creating an Orchestrator Web Service Client Application
- Web Service Endpoint
- Generating the Orchestrator Web Service Stubs
- Accessing the Server from Web Service Clients
- Create a Web Service Client
- Connect to the Orchestrator Web Service
- Find Objects in the Orchestrator Server
- Find Objects by Using the find Operation
- Find Objects by Using the findForId Operation
- Find Objects by Using the findRelation Operation
- Find Workflows in the Orchestrator Server
- Find Workflows by Using the getAllWorkflows Operation
- Find Workflows by Using the getWorkflowsWithName Operation
- Find Workflows by Using the getWorkflowForID Operation
- Run Workflows from a Web Service Client
- Interact with a Workflow While it Runs
- Obtain Workflow Results
- Time Zones and Running Workflows Through Web Services
- Web Service Application Examples
- Web Service API Object Reference
- Web Service API Operation Reference
- answerWorkflowInput Operation
- cancelWorkflow Operation
- echo Operation
- echoWorkflow Operation
- executeWorkflow Operation
- find Operation
- findForId Operation
- findRelation Operation
- getAllPlugins Operation
- getAllWorkflows Operation
- getWorkflowForId Operation
- getWorkflowsWithName Operation
- getWorkflowTokenForId Operation
- getWorkflowTokenResult Operation
- getWorkflowTokenStatus Operation
- hasChildrenInRelation Operation
- hasRights Operation
- sendCustomEvent Operation
- simpleExecuteWorkflow Operation
- Writing a Web Service Client Application
- Developing Web Views
- Web View Overview
- Weboperator Web View
- Web View Development Tasks to Perform in Orchestrator
- Create a Web View Skeleton
- Export a Web View as a Template
- Create a Web View from a Template
- Define a Web View Template as a Resource Element
- Create a Web View from a Resource Element Template
- Export Web View Files to a Working Folder
- Configure the Server for Web View Development
- Import Web View Files from a Working Folder
- Create a Web View Attribute
- Add a Resource Element to a Web View
- Disable Web View Development Mode
- Publish a Web View
- File Structure of a Web View
- Web View Home Page
- Web View Components
- Tapestry Web View Components
- Creating Tapestry Web View Components
- Orchestrator Tapestry Component Library
- vco:DisplayProperty Component
- vco:IfMemberOf Component
- vco:IncludeJavascript Component
- vco:IncludeStylesheet Component
- vco:IncludeWorkflowHeader Component
- vco:ListPane Component
- vco:Login Component
- vco:PageAccessControl Component
- vco:TaskAction Component
- vco:WebformContainer Component
- vco:WorkflowLink Component
- Accessing Server Objects from URLs
- Create a Simple Web View Using the Default Template
- Import the Default Web View Template
- Export the Virtual Machine Manager Web View to a Working Folder
- Provide Unique Component Names
- Configure the Server for Web View Development
- Edit the Virtual Machine Manager Web View Home Page
- Add a vco:ListPane Component to the Web View Home Page
- Define the Web View Attributes for the vco:ListPane Component
- Create a Web View Component to Display Virtual Machine Information
- Create a Web View Tab by Using the Menu Component
- Add Links to Run Workflows from a Web View by Using the vco:WorkflowLink Component
- Customize the Web View Interface
- Publish the Virtual Machine Manager Web View
- Index
Summary of content (336 pages)
PAGE 194
vCenter Orchestrator Developer's Guide Table 7-6. Contents of the Solar System Configuration WAR File Directory Filename Description o11nplugin-solarsystem-config\ index.jsp JSP file that defines the layout of the configuration tab for the plug-in. o11nplugin-solarsystemconfig\WEB-INF\ web.xml Sets up the configuration tab by implementing the appropriate XML schemas, locating the index page, accessing resource files, and implementing security. o11nplugin-solarsystemconfig\WEB-INF\classes\ struts.
PAGE 195
Chapter 7 Developing Plug-Ins Procedure 1 Set Up the Global Plug-In Information on page 195 To create a plug-in, you must point Orchestrator to the relevant XML schema definition and the source files for the application and plug-in. You must also define the behavior of the plug-in when Orchestrator starts and provide a root object for the hierarchy of objects that the plug-in exposes.
PAGE 196
vCenter Orchestrator Developer's Guide 4 Add a tab for the plug-in to the configuration interface by referencing the configuration adapter in the
PAGE 197
Chapter 7 Developing Plug-Ins Procedure 1 Set the data sources for the plug-in
PAGE 198
vCenter Orchestrator Developer's Guide 6 Set the object's properties in the
PAGE 199
Chapter 7 Developing Plug-Ins Define Enumerations You can define enumerations in the vso.xml file to set global values that apply to all objects of a certain category. The categories that you set in the vso.xml file appear as enumerations in the Orchestrator JavaScript API. Prerequisites You must have set up the plug-in and defined
PAGE 200
vCenter Orchestrator Developer's Guide Prerequisites You must have set up the plug-in, and defined
PAGE 201
Chapter 7 Developing Plug-Ins
PAGE 202
vCenter Orchestrator Developer's Guide Create the Plug-In DAR Archive The final stage in the creation of a plug-in is to create the DAR archive that you import to Orchestrator. The DAR archive is a standard ZIP file that you rename to .dar. The DAR archive contains all of the elements of the plug-in implementation and must adhere to a standard file and folder structure.
PAGE 203
Chapter 7 Developing Plug-Ins Build the Solar System Application and Plug-In If you adapt the solar system application or the solar system plug-in, you can rebuild the DAR file by using the Apache Ant building tool. The Orchestrator examples bundle contains the scripts and build.xml file that allow you to rebuild the solar system DAR file and the JAR files that it contains. If you add new files to the solar system plug-in, you must update the build.xml file.
PAGE 204
vCenter Orchestrator Developer's Guide Install a Plug-In in the Orchestrator Server After you create the plug-in DAR file, you must install it in the Orchestrator server. You install plug-ins in the Orchestrator configuration interface. Prerequisites You have a completed DAR file for a plug-in. Procedure 1 Open the Orchestrator configuration interface in a Web browser and log in. http://orchestrator_server_DNS_name_or_IP_address:8282 2 Click Plug-ins.
PAGE 205
Chapter 7 Developing Plug-Ins Procedure 1 View Plug-In Scripting Objects in the JavaScript API on page 205 The objects of a plugged-in technology that you map to Orchestrator scripting objects appear in the Orchestrator JavaScript API. 2 Run Workflows on Plug-In Objects in the Inventory on page 206 You can use the scripting objects that a plug-in adds to the Orchestrator JavaScript API to write workflows and actions to interact with the plugged-in technology.
PAGE 206
vCenter Orchestrator Developer's Guide Run Workflows on Plug-In Objects in the Inventory You can use the scripting objects that a plug-in adds to the Orchestrator JavaScript API to write workflows and actions to interact with the plugged-in technology. The solar system plug-in includes a package of workflows that you can use to perform operations on the objects that the plug-in adds to the Orchestrator inventory. Prerequisites n Install the solar system plug-in in the Orchestrator server.
PAGE 207
Chapter 7 Developing Plug-Ins n Start the Orchestrator client. Procedure 1 Click Policy Templates in the Orchestrator client. 2 Expand the Samples > SolarSystem nodes in the hierarchical list of policies. 3 Right-click the Star policy and select Apply Policy. 4 Add a policy description and select a Star object on which to apply the policy in the Apply Policy dialog box and click Submit. The Star policy opens in the Policies tab. 5 Click the Star policy and open the Scripting tab.
PAGE 208
vCenter Orchestrator Developer's Guide 2 Expand the Samples > SolarSystem nodes in the hierarchical list of workflows to see the list of workflows that the solar system plug-in adds to the library. 3 Right-click the Wait On Flare Event workflow, select Start workflow, and click Submit. The Wait On Flare Event workflow calls the SolarSystemTriggerGenerator.createStarFlareTrigger() method to create an event trigger. 4 Click the workflow token for this run of the Wait On Flare Event workflow.
PAGE 209
Chapter 7 Developing Plug-Ins You can run workflows to add a planet to the Sun, modify, split, or remove planets from a Web browser. You can examine the structure and files of the solar system Web view in the source files of the solar system plugin or exporting the Web view to a directory in Web Views in the Orchestrator client. What to do next You can adapt the classes of the solar system application and the plug-in implementation to experiment with plug-in development.
PAGE 210
vCenter Orchestrator Developer's Guide Method Returns Description loadConfiguration(java.io.Input Stream stream) Void Loads or reloads the configuration. If the stream property is null, the plug-in loads its default configuration. Returns java.io.IOException if it encounters an error. saveConfiguration(java.io.Outpu tStream stream) Void Saves the configuration details.
PAGE 211
Chapter 7 Developing Plug-Ins Method Returns Description addWatcher(PluginWatcher watcher) Void Adds a watcher to monitor for a specific event createPluginFactory(java.lang.S tring sessionID, java.lang.String username, java.lang.String password, IPluginNotificationHandler notificationHandler) IPluginFactory Creates an IPluginFactory instance. The Orchestrator server uses the factory to obtain objects from the plugged-in technology by their ID, by their relation to other objects, and so on.
PAGE 212
vCenter Orchestrator Developer's Guide 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 n n n pushTrigger(java.lang.String type, java.lang.String id, java.lang.String triggerName, java.util.Properties additionalProperties) Void id: Identifier of the object to monitor.
PAGE 213
Chapter 7 Developing Plug-Ins IPluginNotificationHandler Interface The IPluginNotificationHandler defines methods to notify Orchestrator of different types of event that occur on the objects Orchestrator accesses through the plug-in. The IPluginNotificationHandler Interface defines the following methods. Method Returns Description getSessionID() java.lang.String Returns the current session ID notifyElementDeleted(java.lang. String type, java.lang.
PAGE 214
vCenter Orchestrator Developer's Guide Method Returns Description getWebAppContext() String Locates the WAR file of the Web application for the configuration tab. Provide the name and path to the WAR file from the /webapps directory in the DAR file as a string. setWebConfiguration(boolean webConfiguration) Boolean Determine whether the contents of the configuration tab are defined by a Web application.
PAGE 215
Chapter 7 Developing Plug-Ins Localizator Class The Localizator class is a helper class that locates and loads classes in the Orchestrator server. In the context of creating a plug-in configuration tab, the Localizator class creates a classloader to load the classes of the configuration tab implementation to the configuration server and creates a hastable of properties to pass to the classes. public class Localizator extends java.lang.
PAGE 216
vCenter Orchestrator Developer's Guide PluginTrigger Class The PluginTrigger class creates a trigger module that obtains information about objects and events to monitor in the plugged-in technology, on behalf of a Wait Event element in a workflow. The PluginTrigger class defines methods to obtain or set the type and name of the object to monitor, the nature of the event, and a timeout period. You create implementations of the PluginTrigger class exclusively for use by Wait Event elements in workflows.
PAGE 217
Chapter 7 Developing Plug-Ins PluginWatcher Class The PluginWatcher class watches a trigger module for a defined event in the plugged-in technology on behalf of a long-running workflow Wait Event element. The PluginWatcher class defines a constructor that you can use to create plug-in watcher instances. The PluginWatcher class defines methods to obtain or set the name of the workflow trigger to watch and a timeout period. public class PluginWatcher extends java.lang.Object implements java.io.
PAGE 218
vCenter Orchestrator Developer's Guide Method Returns Description removeElement(java.lang.Object element) Void Removes an element from the plugged in technology setElements(java.util.List elements) Void Sets elements in the plugged in technology setTotalCount(long totalCount) Void Sets the total number of elements available in the plugged in technology Constructors n QueryResult() n QueryResult(java.util.List ret) n QueryResult(java.util.
PAGE 219
Chapter 7 Developing Plug-Ins Method Returns Description setPropertyAccessor(java.lang.S tring propertyAccessor) Void Sets an object property accessor setPropertyAccessorTree(java.la ng.Object propertyAccessorTree) Void Sets an object property accessortree setShowInColumn(boolean showInTable) Void Show or hide the object in the database column setShowInDescription(boolean showInDescription) Void Show or hide the object description Constructor SDKFinderProperty(java.lang.
PAGE 220
vCenter Orchestrator Developer's Guide PluginExecutionException Class The PluginExecutionException class returns an error message if the plug-in encounters an exception when it runs an operation. public class PluginExecutionException extends java.lang.Exception implements java.io.Serializable The PluginExecutionException class inherits the following methods from class java.lang.
PAGE 221
Chapter 7 Developing Plug-Ins ConfigurationError.Severity Enumeration The ConfigurationError class uses the ConfigurationError.Severity enumeration to set the level of severity of configuration errors. public static enum ConfigurationError.Severity extends java.lang.Enum
PAGE 222
vCenter Orchestrator Developer's Guide n public static final ErrorLevel Info n public static final ErrorLevel Debug The ErrorLevel enumeration defines the following methods: Method Returns Description values() static ErrorLevel[] Returns an array containing the constants of this enumeration type, in the order that plug-in declares them. You can use this method to iterate through the constants as follows: for (ErrorLevel c : ErrorLevel.values()) System.out.println(c); valueOf(java.lang.
PAGE 223
Chapter 7 Developing Plug-Ins Method Returns Description getValue() int Returns one of the following values: 1 Parent has children -1 Parent has no children 0 Unknown, or invalid parameter valueOf(java.lang.String name) static HasChildrenResult Returns an enumeration constant of this type with the specified name. The String must match exactly an identifier used to declare an enumeration constant of this type. Do not use whitespace characters in the enumeration name.
PAGE 224
vCenter Orchestrator Developer's Guide The ScriptingParameter annotation type has the following value: public abstract java.lang.String value Elements of the vso.xml Plug-In Definition File The vso.xml file contains a set of standard elements. Some of the elements are mandatory while others are optional. Each element has attributes that define values for the objects and operations you map to Orchestrator objects and operations. This information describes all of the elements of the vso.
PAGE 225
Chapter 7 Developing Plug-Ins configuration Element The
PAGE 226
vCenter Orchestrator Developer's Guide deprecated Element The
PAGE 227
Chapter 7 Developing Plug-Ins action Element The
PAGE 228
vCenter Orchestrator Developer's Guide Table 7-17. Element Hierarchy Parent Element Child Elements
PAGE 229
Chapter 7 Developing Plug-Ins Table 7-18. Element Hierarchy Parent Element Child Elements
PAGE 230
vCenter Orchestrator Developer's Guide Attributes Value Description dynamic-finder Java method Defines a custom finder method you implement in an IDynamicFinder instance, to return the ID and properties of a finder programmatically, instead defining it in the vso.xml file. Optional attribute. hidden true or false (default) If true, hides the finder in the Orchestrator client. Optional attribute.
PAGE 231
Chapter 7 Developing Plug-Ins Attributes Value Description name Finder name The name the FinderResult uses to store the element. Mandatory attribute. display-name Finder name The displayed property name. Optional attribute. bean-property Property name You use the bean-property attribute to identify a property to obtain using get and set operations. If you identify a property named MyProperty, the plugin defines getMyProperty and setMyProperty operations.
PAGE 232
vCenter Orchestrator Developer's Guide Attributes Value Description name Relation name A name for this relation. Mandatory attribute. type Orchestrator object type The type of the object that relates to another object by this relation. Mandatory attribute. cardinality to-one or to-many Defines the relation between the objects as one-to-one or one-to-many. Optional attribute. Table 7-25.
PAGE 233
Chapter 7 Developing Plug-Ins Table 7-28. Element Hierarchy Parent Element Child Elements
PAGE 234
vCenter Orchestrator Developer's Guide Type Value Description name Trigger name A name for the trigger. Optional attribute. display-name Trigger name The name that displays in the Orchestrator client. Optional attribute. type Trigger type The object type that defines the trigger. Mandatory attribute. Table 7-32. Element Hierarchy Parent Element Child Elements
PAGE 235
Chapter 7 Developing Plug-Ins object Element The
PAGE 236
vCenter Orchestrator Developer's Guide Table 7-37. Element Hierarchy Parent Element Child Elements
PAGE 237
Chapter 7 Developing Plug-Ins attribute Element The
PAGE 238
vCenter Orchestrator Developer's Guide Type Value Description java-name Java method Name of the Java method signature with argument types in parenthesis, for example, getVms(DataStore). Mandatory attribute. script-name JavaScript method Name of the corresponding JavaScript method. Mandatory attribute. return-type Java object type The type this method obtains. Optional attribute. static true or false If true, this method is static. Optional attribute.
PAGE 239
Chapter 7 Developing Plug-Ins Method parameters Element The
PAGE 240
vCenter Orchestrator Developer's Guide enumerations Element The
PAGE 241
Chapter 7 Developing Plug-Ins Type Value Description id Text The identifier that objects use to set the enumeration entry as an attribute. Mandatory attribute. name Text The entry name. Mandatory attribute. Table 7-52. Element Hierarchy Parent Element Child Elements
PAGE 242
vCenter Orchestrator Developer's Guide 242 VMware, Inc.
PAGE 243
Developing a Web Services Client 8 VMware vCenter Orchestrator provides a Web services API so that you can develop applications to access workflows through Web services. The main purpose of the Orchestrator Web service is to start workflows and to retrieve their output parameters through a network or the Web.
PAGE 244
vCenter Orchestrator Developer's Guide Figure 8-1.
PAGE 245
Chapter 8 Developing a Web Services Client Web Service Endpoint The Web service endpoint is the port upon which you connect a Web service client to the Orchestrator server. You connect to the Orchestrator Web service's endpoint at the following URL, in which
PAGE 246
vCenter Orchestrator Developer's Guide Accessing the Server from Web Service Clients By default, Orchestrator permits access to workflows from Web service clients. However, the Orchestrator administrator can configure the server to deny connections from Web service clients. If the Orchestrator administrator has disabled access to the server from Web service clients, the server only answers Web service client calls from the echo() and echoWorkflow() methods, for testing purposes.
PAGE 247
Chapter 8 Developing a Web Services Client 10 Run Workflows from a Web Service Client on page 253 The main purpose of a Web services client is to run workflows across a network. 11 Interact with a Workflow While it Runs on page 254 After the workflow starts, the Web services client can perform various actions in response to events while the workflow is running.
PAGE 248
vCenter Orchestrator Developer's Guide Find Objects in the Orchestrator Server To perform any useful task with a workflow, you must find the objects on which the workflow will run. The Orchestrator Web service API provides functions for finding objects of all types in the VMware Infrastructure inventory. Workflows typically run on objects in the vCenter Server. Workflows can also run on objects from outside the vCenter Server by accessing them through plug-ins.
PAGE 249
Chapter 8 Developing a Web Services Client 2 n Calls the QueryResult object's getElements operation to obtain the details of the objects found as an array of FinderResult objects. n Passes the array of FinderResult objects to the internal method displayFinderResult, which extracts the information. Extract the results from a FinderResult object.
PAGE 250
vCenter Orchestrator Developer's Guide In the preceding example, vcenter/vm-xx is the ID of a virtual machine object that the findForID operation finds. The findForID operation returns a FinderResult instance directly, rather than creating an array of FinderResult objects like find. Finding objects by their unique ID always returns only one object. 2 Extract the results from a FinderResult object.
PAGE 251
Chapter 8 Developing a Web Services Client The returned children are related to the parent by the getResourcePool relation, defined by the Orchestrator vCenter Server 4 plug-in. n 2 Extract the results from a FinderResult object. To show, interpret, or process the results in the FinderResult objects that the find operation returns, you must convey these results to the Web service application. The following example shows how to extract the results returned in a FinderResult object.
PAGE 252
vCenter Orchestrator Developer's Guide Prerequisites You must have implemented Web service operations in your client application to find objects in the Orchestrator server. Procedure u Create an array of Workflow objects by calling the getAllWorkflows operation. Workflow[] workflows = vsoWebControl.getAllWorkflows(username, password); The preceding code example calls getAllWorkflows to get an array of Workflow objects that the Web service client can run.
PAGE 253
Chapter 8 Developing a Web Services Client Procedure u Create a Workflow object by calling the getWorkflowForID operation. String workflowId = "1880808080808080808080808080808087808080011713796199469943be4c882"; Workflow workflow = vsoWebControl.getWorkflowForID(workflowId, username, password); You found a workflow in the Orchestrator server that the Web service client can run on objects. What to do next Implement operations in the Web services client to run the workflows it finds.
PAGE 254
vCenter Orchestrator Developer's Guide 3 Run the workflow by calling the executeWorkflow operation. To run a workflow, you pass the workflow attributes to the executeWorkflow operation in the form of a WorkflowTokenAttribute array. Running a workflow creates a WorkflowToken object, which represents the instance of the workflow that runs with the specific input parameters that it receives when it starts. WorkflowToken token = vsoWebControl.
PAGE 255
Chapter 8 Developing a Web Services Client String[] status = vsoWebControl.getWorkflowTokenStatus(tokenIds, username, password); tokenStatus = status[0]; System.out.println("Workflow is still running...(" + tokenStatus + ")"); } The preceding example obtains the IDs of an array of workflow tokens. It checks the status of a WorkflowToken by calling getWorkflowTokenStatus().
PAGE 256
vCenter Orchestrator Developer's Guide What to do next Implement operations in the Web services client to extract the workflow results. Obtain Workflow Results After the workflow completes its run, you can retrieve the results by calling the getWorkflowTokenResult( ) operation. Prerequisites You must have implemented how workflows start in the Orchestrator server in the Web services client. Procedure 1 Obtain the results of a running workflow by calling the getWorkflowTokenResult( ) operation.
PAGE 257
Chapter 8 Developing a Web Services Client To avoid this problem, you can create a function to compare dates in your Web services application. You must serialize the date and time, taking the time zone information into account. The following Java code example shows how to transform a String that Orchestrator returns into a Date object. public Date dateFromString(String value){ java.text.DateFormat s_dateFormat = new java.text.
PAGE 258
vCenter Orchestrator Developer's Guide The objects searched for can also be identified by ID or by relation using the findForId and findRelation operations, as the following example shows. public FinderResult findForId(String type, String id, String username, String password); public FinderResult[] findRelation(String parentType, String parentId, String relation, String username, String password); NOTE FinderResult is not an Orchestrator scriptable object.
PAGE 259
Chapter 8 Developing a Web Services Client Property Object A Property object represents a key-value pair that describes the properties of an item in the Orchestrator inventory. You can obtain a Property object by calling the getProperties operation on a FinderResult object, as the following example shows. Property[] props = finderResult.getProperties(); This example method call returns the contents of the FinderResult object's properties attribute.
PAGE 260
vCenter Orchestrator Developer's Guide Workflow Object A Workflow object represents an Orchestrator workflow that defines a certain sequence of tasks, decisions, and operations. Users with the correct permissions can obtain specific Workflow objects by name or by ID, or they can obtain all the workflows they have the permission to see. Orchestrator provides the following operations to obtain Workflow objects.
PAGE 261
Chapter 8 Developing a Web Services Client Type Value Description WorkflowParameter[] outParameters The outParameters array is the set of WorkflowParameter objects that result from running a workflow. This array allows the workflow to send errors, the names of any created objects, and other information as output. You can set up arbitrary output parameters to generate any information that you need.
PAGE 262
vCenter Orchestrator Developer's Guide Type Value Description String id The identifier of this particular instance of a completed workflow. String title The title of this particular instance of a completed workflow. By default, the WorkflowToken title is the same as the Workflow title, although some operations do allow you to set a different WorkflowToken title when you start the workflow. String workflowId The identifier of the workflow of which this WorkflowToken object is a running instance.
PAGE 263
Chapter 8 Developing a Web Services Client Type Value Description String globalState The state of the workflow as a whole, with the following possible values: n running: the workflow is running n waiting: the workflow is waiting for runtime parameters, which can be provided by answerWorkflowInput waiting-signal: the workflow is waiting for an external event n canceled: the workflow was canceled by a user or by an application n completed: the workflow has finished n failed: the workflow encountered a
PAGE 264
vCenter Orchestrator Developer's Guide Type Value Description String endDate Date and time that this workflow token ended, if the workflow token has finished. The endDate value is filled in at the moment the workflow reaches the end of its run. The endDate is only set when the workflow finishes in one of the completed, failed or canceled states. String xmlContent Defines input parameters, output parameters, attributes, and the content of error messages.
PAGE 265
Chapter 8 Developing a Web Services Client You can also pass an array of WorkflowTokenAttribute objects to the answerWorkflowInput operation to provide input that a workflow token needs while it runs. public void answerWorkflowInput(String workflowTokenId, WorkflowTokenAttribute[] answerInputs, String username, String password); The following table shows the properties of the WorkflowTokenAttribute object.
PAGE 266
vCenter Orchestrator Developer's Guide WorkflowTokenAttribute objects' properties is not set, or if an attribute value is not one that the workflow expects, the Web service sends the answerWorkflowInput request, with the invalid WorkflowTokenAttribute object. If a WorkflowTokenAttribute object is invalid, the workflow fails, entering the failed state without informing the Web service application.
PAGE 267
Chapter 8 Developing a Web Services Client Return Value Returns the same String as you provide as an input parameter. echoWorkflow Operation The echoWorkflow operation tests the connection to the Web service by checking serialization. The echoWorkflow operation provides a useful debugging tool if you are connecting to an older Web service implementation. Calling this operation verifies the connection to the server by checking that the serialize and deserialize operations work correctly.
PAGE 268
vCenter Orchestrator Developer's Guide find Operation The find operation finds elements that correspond to a particular query. The find operation obtains objects of any type by searching for a particular name. The query results are provided in the form of a QueryResult object, which contains an array of FinderResult objects with a total counter. The query itself is passed to find as the second parameter, as the following operation declaration shows.
PAGE 269
Chapter 8 Developing a Web Services Client Type Value Description String type Type of object looked for. String query The query. The query is a string enclosed in quotation marks. Any object of the type specified by the type parameter with a name that matches the query string is returned in the QueryResult object. String username Orchestrator user name. String password Orchestrator password. Return Value Returns the result of the query as a QueryResult object.
PAGE 270
vCenter Orchestrator Developer's Guide Type Value Description String parentType The type of parent object. The parentType property can be the name of a plug-in, or it can specify a more narrowly defined parent. For example, you can specify the parentType as "VC:" to obtain the objects at the root of VMware vCenter Server plug-in, or you can a specific folder, such as "VC:VmFolder". String parentId The ID of a particular parent object.
PAGE 271
Chapter 8 Developing a Web Services Client Table 8-2.
PAGE 272
vCenter Orchestrator Developer's Guide getAllPlugins Operation The getAllPlugins operation returns the description of all the plug-ins installed in Orchestrator. Many of the actions that you perform using Orchestrator depend on functions that you enable through plugins. Workflows might depend on the existence of certain custom plug-ins, or on standard plug-ins that the administrator has disabled. Consequently, you can check that the necessary plug-ins are present before you run a workflow.
PAGE 273
Chapter 8 Developing a Web Services Client You can find out a workflow ID by checking the workflow's workflowID property, as the following example shows. String workflowId = workflows[0].getId(); The getWorkflowForId operation is declared as follows. public Workflow getWorkflowForId(String workflowId, String username, String password); Type Value Description String workflowId ID of the workflow to retrieve. String username Orchestrator user name. String password Orchestrator password.
PAGE 274
vCenter Orchestrator Developer's Guide getWorkflowTokenForId Operation The getWorkflowTokenForId operation finds the WorkflowToken object for a specific workflow token. The getWorkflowTokenForId operation is declared as follows. public WorkflowToken getWorkflowTokenForId(String workflowTokenId, String username, String password); Individual threads or functions can run multiple workflows. The getWorkflowTokenForId operation allows a central process or thread to track the progress of each workflow.
PAGE 275
Chapter 8 Developing a Web Services Client Type Value Description String workflowTokenId ID of this specific run of the workflow String username Orchestrator user name. String password Orchestrator password. Return Value Returns an array of WorkflowTokenAttribute objects that correspond to the provided workflow token ID or IDs. Returns null if you pass it an invalid parameter.
PAGE 276
vCenter Orchestrator Developer's Guide hasChildrenInRelation Operation The hasChildrenInRelation operation checks whether a given relation type has any children. In some cases, objects are most easily located through their relationships with other objects. You can obtain all the objects that relate to another object by a given relation by calling the findRelation operation on that object. The findRelation operation finds only the relatives of a known object.
PAGE 277
Chapter 8 Developing a Web Services Client Return Value Returns one of the following values: 1 Yes, children of the specified relation type are present -1 No, children of the specified relation type are not present 0 Unknown, or an input parameter is invalid Related Information For more information, see “findRelation Operation,” on page 269. hasRights Operation The hasRights operation checks whether a user has permissions to view, edit, and run workflows.
PAGE 278
vCenter Orchestrator Developer's Guide sendCustomEvent Operation The sendCustomEvent operation synchronizes workflows with external events. public void sendCustomEvent(String eventName, String serializedProperties); The sendCustomEvent operation sends messages from Web service clients to workflows that are waiting for a particular event to occur before they run. The waiting workflows resume their run when they receive the message from sendCustomEvent.
PAGE 279
Chapter 8 Developing a Web Services Client The waitCustomEventUntil operation's parameters are as follows. internal / external The awaited event comes from another workflow (internal) or from a Web service application (external). customEventKey The name of the awaited event. myDate The date until which waitCustomEventUntil waits for a message from sendCustomEvent. simpleExecuteWorkflow Operation The simpleExecuteWorkflow operation uses string attributes to start a workflow.
PAGE 280
vCenter Orchestrator Developer's Guide 280 VMware, Inc.
PAGE 281
Developing Web Views 9 Orchestrator Web views are Web 2.0 frontends that allow users to access Orchestrator workflows and objects in the Orchestrator inventory by using a Web browser rather than by using the Orchestrator client. Orchestrator provides a standard Web view that users can use to run workflows, called weboperator. The weboperator Web view provides end users with browser access to all of the workflows in the library, that they can run on all of the objects in the inventory.
PAGE 282
vCenter Orchestrator Developer's Guide n Create a Simple Web View Using the Default Template on page 313 The easiest way to create a Web view is to use a template. Orchestrator provides a default Web view template to help you create Web views. Web View Overview A Web view is a package of Web pages, style sheets, icons, and banners that represent a complete Web site. Web views can contain special Java Web Components (JWC) that add Orchestrator functions to the pages of the Web views.
PAGE 283
Chapter 9 Developing Web Views Start the Weboperator Web View You start the weboperator Web view from the Orchestrator client. Procedure 1 Click the Web Views view in the Orchestrator client. The weboperator Web view and any other Web views that you have imported into Orchestrator appear. 2 Right-click weboperator and select Publish. 3 Open a browser and go to http://orchestrator_server:8280.
PAGE 284
vCenter Orchestrator Developer's Guide n Create a Web View Skeleton on page 284 You can create a Web view by creating a Web view skeleton. A Web view skeleton contains no HTML files or Web view components, and requires you to create these elements using Web development tools. n Export a Web View as a Template on page 285 You can use an existing Web view as a template. You can export a Web view as a template, and then edit the exported template to create a Web view.
PAGE 285
Chapter 9 Developing Web Views 3 Type a name for the Web view in the Create Web View text box and click OK. 4 Right-click the Web view in the Web view list and select Edit. The Web view editor opens. 5 On the General tab, set the URL folder value to include a suffix for the URL on which Orchestrator will publish the Web view.
PAGE 286
vCenter Orchestrator Developer's Guide Create a Web View from a Template You can reduce the amount of development work by creating a Web view from a template. A Web view template is a ZIP file that contains all the files and components of an existing Web view that you can use as the basis from which to create a new Web view. Orchestrator provides a default Web view template that you can use as the starting point for Web view development.
PAGE 287
Chapter 9 Developing Web Views What to do next Export the contents of the new Web view to a working folder to modify them, and edit the Web view settings and attributes in the Orchestrator client. Define a Web View Template as a Resource Element Instead of exporting a Web view to your local system for use as a Web view template, you can define a Web view template as a resource element in the Orchestrator server.
PAGE 288
vCenter Orchestrator Developer's Guide 7 On the General tab, set the URL folder value to include a suffix for the URL on which Orchestrator will publish the Web view. For example, if you set the URL folder to MyWebView, Orchestrator publishes the Web view at http://orchestrator_server:8280/vmo/MyWebView/, where orchestrator_server is the IP address or DNS name of the machine on which the Orchestrator server is running.
PAGE 289
Chapter 9 Developing Web Views Configure the Server for Web View Development During the Web view development process, you can configure the Orchestrator server to publish the Web view from a working folder rather than from the Orchestrator server. When the server runs in development mode, you can preview the Web view as you develop it, without having to import it to the Orchestrator server to view it. You set the Orchestrator server to Web view development mode in the Orchestrator configuration interface.
PAGE 290
vCenter Orchestrator Developer's Guide 10 Verify that your Web view's URL folder value matches the name of your working directory. For example, if you created the working folder C:\Documents and Settings\username\Desktop\MyWebView\, set the URL folder to MyWebView. 11 a If the Web view is running, right-click the Web view and select Unpublish. b Right-click the Web view and select Edit.
PAGE 291
Chapter 9 Developing Web Views Procedure 1 Click the Web Views view in the Orchestrator client. 2 Right-click the Web view and select Edit. 3 Click the Attributes tab in the Web view editor. 4 Right-click in the Attributes tab and select Add attribute. 5 Click the attribute name and type a name. 6 Click the attribute Type link and select the attribute type from the list. 7 Click the attribute Value link and type or select the value of the attribute.
PAGE 292
vCenter Orchestrator Developer's Guide 9 Click Value and type the name of the resource element or category of resource elements in the Filter text box. 10 Select the resource element or folder of resource elements from the proposed list and click Select. 11 Click Save and Close to exit the editor. You added a resource element or folder of resource elements as an attribute in a Web view.
PAGE 293
Chapter 9 Developing Web Views 2 Right-click the Web view to publish and select Publish. Orchestrator publishes the Web view at http://orchestrator_server:8280/vmo/web_view_url_folder/. The IP address or DNS name of the machine on which the Orchestrator server is running is orchestrator_server. The name of the Web view URL folder is web_view_url_folder.
PAGE 294
vCenter Orchestrator Developer's Guide Table 9-1. Contents of the Web View Template default.html File Code Description
PAGE 295
Chapter 9 Developing Web Views Add a Tapestry Component in an HTML Page You add Tapestry components to a Web view by adding a jwcid attribute to an HTML tag in a Web page. The jwcid attribute references a Web view component. You can add a jwcid attribute to any HTML tag. You can add references to components from the Orchestrator Web view component library, to components from the Tapestry Standard, or to custom components that you create.
PAGE 296
vCenter Orchestrator Developer's Guide You can precede the @ character with a unique identifier. With the unique identifier, you can reuse the class throughout the HTML page, by referencing the unique identifier. In the following example, the component is Border and the unique identifier is myBorderComponent.
PAGE 297
Chapter 9 Developing Web Views Example: Web View Template Access.html File
PAGE 298
vCenter Orchestrator Developer's Guide Method Returns Description translateParameters(java.util.L ist parametersValues) java.lang.Object[] If the object value is a string that begins with "attribute:", translateParameters translates an array of objects into a FinderResult object. If the string does not begin with "attribute:", it does nothing. getClientId() java.lang.String Obtains the ID of the client. setClientId(java.lang.String id) void Sets the ID of the client. getDojoSource() org.
PAGE 299
Chapter 9 Developing Web Views Method Returns Description executeAction(java.lang.String actionAttributeName) java.lang.Object Runs an action in the server and returns the result. executeAction(java.lang.String actionAttributeName, java.lang.Object actionParameters) java.lang.Object Runs an action in the server and returns the result. getAbsoluteUrl(java.lang.String relativeUrl) java.lang.String Returns the absolute URL from a relative URL. getAttribute(java.lang.String attributeName) java.
PAGE 300
vCenter Orchestrator Developer's Guide WebObjectComponent Class The ch.dunes.web.webview.components.WebObjectComponent class provides methods to obtain information from objects in the Orchestrator server. The WebObjectComponent class extends WebviewComponent. You use the WebObjectComponent class in conjunction with vco:ListPane components. The vco:ListPane component inserts a list of objects into a Web view.
PAGE 301
Chapter 9 Developing Web Views
PAGE 302
vCenter Orchestrator Developer's Guide Example: vco:IfMemberOf Component The following example shows how to use the vco:IfMemberOf component to add information about a user's LDAP group membership to a Web view. You are a member of the group that the adminGroup attribute defines. You are not a member of the group that the adminGroup attribute defines.
PAGE 303
Chapter 9 Developing Web Views Example: vco:IncludeStylesheet Component The .css file extension is optional. The following example code lines both return the same href or src value. The following example code line references a Web view attribute that contains a path to a CSS file. You create Web view attributes in the Orchestrator client.
PAGE 304
vCenter Orchestrator Developer's Guide Name Type Description attribute String A Web view attribute that references an array of objects that you define in the Orchestrator client. The array of objects appears in the vco:ListPane component in the Web view. action String A Web view attribute that references an action. The action must return an array of objects. actionParameters Array of objects Array of parameters that an action requires.
PAGE 305
Chapter 9 Developing Web Views Example: vco:ListPane Component The following example displays a list of virtual machines in a pane of a Web view.
vCenter Orchestrator Developer's Guide If the user is a member of at least one group that the allow attribute defines, the user can access the page. Otherwise, the Web view does not display the page. You set the LDAP groups of users who can view the page as Web view attributes in the Orchestrator client. Properties The vco:PageAccessControl component defines the following properties. Name Type Description deny String A Web view attribute of the type LdapGroup, or an array of LdapGroup objects.
PAGE 307
Chapter 9 Developing Web Views Name Type Description attribute String A Web view attribute. The vco:TaskAction displays the possible actions to perform on the object that corresponds to this Web view attribute. action String A Web view attribute of type Action. The vco:TaskAction component displays the possible actions to perform on the object that this action returns. actionParameters List A list of parameters for the action. object Object An object.
PAGE 308
vCenter Orchestrator Developer's Guide Example: vco:WebformContainer Component To add a vco:WebformContainer component to a Web view, you must also include a vco:IncludeWorkflowHeader component in the
tag of the Web view page, as the following example shows. PAGE 309Chapter 9 Developing Web Views Name Type Description webformPage String URL of a page that contains a vco:WebformContainer component, to open a Web form when a user starts a workflow. Default is system/form.html. isDialog Boolean If true, the Web form opens in a dialog box. Default is false. width Float Width of the dialog box. Values less than 1 define a ratio in relation to the width of the window. Values greater than 1 define the size in pixels. Default is 0.5.
PAGE 310
vCenter Orchestrator Developer's Guide Example: vco:WorkflowLink Component The following code example adds a link to a Web view that starts an action when the user clicks it. Click here Accessing Server Objects from URLs You can add URLs to Web view pages to access objects in the Orchestrator server, without having to implement a Web view component.
PAGE 311
Chapter 9 Developing Web Views Setting Action Parameters in a URL You pass input parameters to the action by setting the actionParameters property in the URL. Depending on the action, you might need to declare the input parameters for the action as Web view attributes. If the action parameters are Web view attributes, you must prefix the Web view attribute name of the parameter with attribute:, as the following example shows.
PAGE 312
vCenter Orchestrator Developer's Guide 4 Create Web view attributes for each of the input parameters that the action requires. For example, name a Web view attribute ActionParameterAttribute. 5 Click Save and close to exit the Web view editor. 6 Open the HTML page in which to insert the URL in an HTML editor. 7 Add a link to http://orchestrator_server: 8280/vmo/web_view_url_folder/system/vmo/pages/action.html at the appropriate place in the HTML file.
PAGE 313
Chapter 9 Developing Web Views n Created a Web view in the Orchestrator client n Created a Web view page in which to insert a URL to run an action Procedure 1 In the Web views view of the Orchestrator client, right-click the Web view to which to add the URL and select Edit. You must unpublish a running Web view to edit it. 2 Right-click in the Attributes tab of the Web view editor and select Add attribute.
PAGE 314
vCenter Orchestrator Developer's Guide 4 Configure the Server for Web View Development on page 317 During the Web view development process, you can configure the Orchestrator server to publish the Web view from a working folder rather than from the Orchestrator server. 5 Edit the Virtual Machine Manager Web View Home Page on page 318 You create the home page of the Virtual Machine Manager Web view in the default.html file. The default.html file must be at the root of the working directory.
PAGE 315
Chapter 9 Developing Web Views 3 Click Browse and browse to the appropriate folder. Option Action If you installed the standalone version of Orchestrator Go to C:\Program Files\VMware\Orchestrator\apps\webviewTemplates\default_web view.zip If the vCenter Server installed Orchestrator Go to C:\Program Files\VMware\Infrastructure\Orchestrator\apps\webviewTempla tes\default_webview.zip 4 Select the default_webview.zip file and click Open. 5 Name the Web view Virtual Machine Manager.
PAGE 316
vCenter Orchestrator Developer's Guide Contents of the Default Web View Template After you export the Web view to your working folder, you can examine the contents of the default Web view template. The default_webview Web view template contains the following files: default.html Home page of the default Web view template. components\layout\Acces JWC component that provides a login function. s.jwc components\layout\Acces HTML template that defines how the login component appears in the browser. s.
PAGE 317
Chapter 9 Developing Web Views 2 Rename the MyBorder.html file to VMMBorder.html. 3 Rename the MyBorder.jwc file to VMMBorder.jwc. What to do next Configure the server for Web view development. Configure the Server for Web View Development During the Web view development process, you can configure the Orchestrator server to publish the Web view from a working folder rather than from the Orchestrator server.
PAGE 318
vCenter Orchestrator Developer's Guide 10 Verify that your Web view's URL folder value matches the name of your working directory. For example, if you created the working folder C:\Documents and Settings\username\Desktop\MyWebView\, set the URL folder to MyWebView. 11 a If the Web view is running, right-click the Web view and select Unpublish. b Right-click the Web view and select Edit.
PAGE 319
Chapter 9 Developing Web Views 5 Delete the default
heading from the default.html file. This heading is unnecessary for the simple Web view that this example demonstrates. Delete the following code line.
PAGE 320
vCenter Orchestrator Developer's Guide actionParameters="attribute:vmFolder" detailUrl="./panel.html"/> The
tag instantiates the vco:ListPane component with the following properties: jwcid= "@vco:ListPane" Refers to the vco:ListPane component, to add a list of virtual machines from the server inventory to the Web view. action= Links to a Web view attribute that runs an action in the Orchestrator server to retrieve a list of virtual machines.
PAGE 321
Chapter 9 Developing Web Views n Value: a virtual machine folder that you select from the vCenter server inventory NOTE If you install the Virtual Machine Manager Web view from the Orchestrator samples bundle, you must edit the vmFolder attribute to point to a virtual machine folder in your vCenter Server before you publish the Web view. 8 Click Save and Close to exit the Web view editor.
PAGE 322
vCenter Orchestrator Developer's Guide 6 Add a table to the DisplayVmInfo.html file to contain information about the virtual machines that are in the list.
PAGE 323
Chapter 9 Developing Web Views Create a Web View Tab by Using the Menu Component The default Web view template provides a Menu component that you can use to create navigation tabs in a Web view. The VMMBorder component that the default Web view template uses to render its layout includes a reference to the Menu component. Any changes you make to the Menu component appear in the Web view.
PAGE 324
vCenter Orchestrator Developer's Guide 9 Open the Virtual Machine Manager Web view in a browser at http://
PAGE 325
Chapter 9 Developing Web Views 9 Open the Virtual Machine Manager Web view in a browser at http://
PAGE 326
vCenter Orchestrator Developer's Guide 5 (Optional) Customize any part of the Web view by modifying the custom.css file. You can edit the custom.css to override the VMMBorder.html component template file and the border.css style sheet to modify the overall layout of the Web view. NOTE The custom.cssstyle sheet is the only layout file that you should modify. If you modify other style sheets or component template files, your changes are lost if you upgrade Orchestrator.
PAGE 327
Chapter 9 Developing Web Views You imported the Virtual Machine Manager Web view from your working directory to the server and published it. NOTE If you install the Virtual Machine Manager Web view from the Orchestrator samples bundle, you must edit the vmFolder attribute to point to a virtual machine folder in your vCenter Server before you publish the Web view. What to do next You can open the Virtual Machine Manager Web view in a browser and use it to examine virtual machines and run workflows.
PAGE 328
vCenter Orchestrator Developer's Guide 328 VMware, Inc.
PAGE 329
Index A D Action element 23 action elements, binding 75 Action view 107 Actions 107 actions adding 108 attributes 110 basic guidelines 109 binding 76 coding guidelines 109 creating 91, 108 finding elements that implement 109 naming 110 parameters 110 reusing 107 Actions view 108 answerWorkflowInput 254, 265 API Explorer, accessing 114 attributes definition 19, 70 read-write properties 85, 105 authorizations 11 Decision element 23 decision element, bindings 75 decision elements, linking 34 Decision eleme
PAGE 330
vCenter Orchestrator Developer's Guide H O hasChildrenInRelation 276 HasChildrenResult Enumeration 222 hasRights 277 hasRights operation 253 OGNL expressions 11 Orchestrator API 107, 113 Orchestrator architecture 11 Orchestrator client, accessing 15 Orchestrator overview 9 OS commands, accessing 118 OUT bindings 32 I IConfigurationAdaptor interface 209 IDynamicFinder interface 210 IN bindings 32 input parameters definition 91 obtaining from user 37 properties 38 providing during run 41, 42 setting prop
PAGE 331
Index configuration adapter 185–187, 189 configuration tab 219 ConfigurationError class 214, 221 ConfigurationError.
PAGE 332
vCenter Orchestrator Developer's Guide PluginExecutionException 220 PluginLicenseException 220 PluginOperationException 220 PluginTrigger 173, 216 PluginTrigger class 171 PluginWatcher 217 PluginWatcher class 175 plugs-in, PluginTrigger class 171 policies 11, 168, 169 policy engine 9 presentation creating 87, 105 creating display groups 105 display groups 37 input steps 37 Presentation tab 37, 39, 105 Presentation Tab 38 presentations 17 properties parameter 86 read-write 85 Property 259 Q QueryResult 217
PAGE 333
Index user interactions attributes 41, 42 defining external inputs 46 elements 41, 42 relative timeout 45, 46 user interactions, exceptions 47 user interactions, input parameters dialog box 48 user interactions, responding 49 user interactions, security.group attribute 43 user interactions, timeout.
PAGE 334
vCenter Orchestrator Developer's Guide create from resource element template 287 create from template 313 create skeleton 284 creating from template 286 custom.css 325 customize interface 325 default template 286, 313, 314 default.
PAGE 335
Index calling other workflows 50 creation 16 develop complex 89 editing 16 editing standard workflows 16 file system access 118 input parameter properties 40 nested 50 OGNL expression values 41 permissions 64 phases of development 14 propagate input parameters 52 propagate presentation 52 propagating changes 51 running 66 running on a selection of objects 56 scheduled 50, 54 standard library 16 starting 50 synchronous 50, 52 testing 15 validation 65 workflows, reserved OGNL keywords 20 WorkflowToken 261 Wo
PAGE 336
vCenter Orchestrator Developer's Guide 336 VMware, Inc.