This document supports the version of each product listed and
supports all subsequent versions until the document is
replaced by a new edition. To check for more recent editions
of this document, see http://www.vmware.com/support/pubs.
EN-001137-00
Developing Web Views for VMware vCenter Orchestrator
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
2 VMware, Inc.
Contents
Developing Web Views for VMware vCenter Orchestrator5
Web View Overview7
1
Weboperator Web View9
2
Start the Weboperator Web View 9
Web View Development Tasks to Perform in Orchestrator11
3
Create a Web View Skeleton 11
Export a Web View as a Template 12
Create a Web View from a Template 13
Define a Web View Template as a Resource Element 14
Create a Web View from a Resource Element Template 14
Export Web View Files to a Working Folder 15
Configure the Server for Web View Development 16
Import Web View Files from a Working Folder 17
Create a Web View Attribute 17
Add a Resource Element to a Web View 18
Disable Web View Development Mode 19
Publish a Web View 19
File Structure of a Web View21
4
VMware, Inc.
Web View Home Page23
5
Web View Components25
6
Tapestry Web View Components 25
Add a Tapestry Component in an HTML Page 26
Creating Tapestry Web View Components 26
Tapestry Component Specification File 27
Tapestry Component Template File 28
WebviewComponent Class 28
WebviewPage Class 30
WebObjectComponent Class 31
Orchestrator Tapestry Component Library 32
vco:DisplayProperty Component 33
vco:IfMemberOf Component 33
vco:IncludeJavascript Component 33
vco:IncludeStylesheet Component 34
vco:IncludeWorkflowHeader Component 34
vco:ListPane Component 35
3
Developing Web Views for VMware vCenter Orchestrator
vco:Login Component 37
vco:PageAccessControl Component 37
vco:TaskAction Component 38
vco:WebformContainer Component 39
vco:WorkflowLink Component 40
Accessing Server Objects from URLs43
7
Running Actions from URLs 43
Run an Action from a URL 44
Accessing Resource Elements from URLs 45
Obtain a Resource Element from a URL 45
Create a Simple Web View Using the Default Template47
8
Import the Default Web View Template 48
Export the Virtual Machine Manager Web View to a Working Folder 49
Contents of the Default Web View Template 49
Provide Unique Component Names 50
Configure the Server for Web View Development 50
Edit the Virtual Machine Manager Web View Home Page 51
Add a vco:ListPane Component to the Web View Home Page 53
Define the Web View Attributes for the vco:ListPane Component 54
Create a Web View Component to Display Virtual Machine Information 55
Create a Web View Tab by Using the Menu Component 56
Add Links to Run Workflows from a Web View by Using the vco:WorkflowLink Component 57
Customize the Web View Interface 59
Publish the Virtual Machine Manager Web View 59
Index61
4 VMware, Inc.
Developing Web Views for VMware vCenter
Orchestrator
Developing Web Views for VMware vCenter Orchestrator provides information about developing Web views for
VMware® vCenter Orchestrator.
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.
The Web components which Orchestrator provides can be used to develop custom Web views.
Intended Audience
This information is intended for Web designers and developers who want to create or customize Web front
ends for the Orchestrator processes, using the Web 2.0 technologies.
VMware, Inc.
5
Developing Web Views for VMware vCenter Orchestrator
6 VMware, Inc.
Web View Overview1
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. For example, you can add components that allow users to run workflows from a browser.
Orchestrator Web views update content dynamically without obliging users to reload complete pages.
Orchestrator provides a library of Tapestry Framework 4.0 components to help you build customized Web
views to access Orchestrator functions from a Web browser. Tapestry components provide access to objects
in the Orchestrator server, such as the workflows in the library and the virtual machines in the inventory.
You can also insert Dojo 0.4.1 components into Web views.
Orchestrator provides a Web view template that you can use as the basis for developing Web views. The
Web view template contains skeleton HTML pages and Web view components that you can extend and
adapt. You can also export existing Web views to use as templates that you can adapt to create new Web
views.
You typically create or modify the pages of a Web view externally by using Web design tools. Creating or
modifying Web pages independently of Orchestrator allows you to separate the Web design process from
the process of developing Orchestrator Web view components. You import the Web view pages and
components into the Orchestrator server and complete the process of creating the Web view in the
Orchestrator client.
VMware, Inc.
Developing Orchestrator Web views can require knowledge of some or all of the following Web
development technologies and standards. For documentation about the different technologies, consult the
Web sites of the organizations that maintain the standards.
Cascading stylesheets (CSS). See http://www.w3.org/Style/CSS/.
n
Ajax platform. See http://www.ajax.org/.
n
Dojo toolkit. See http://www.dojotoolkit.org/.
n
Java programming language. See http://www.oracle.com/technetwork/java/index.html.
n
Java Web Components (JWC) from the Tapestry Framework. See http://tapestry.apache.org/.
n
JavaScript Object Notation (JSON). See http://www.json.org/.
n
Object-Graph Navigation Language (OGNL). See http://www.opensymphony.com/ognl/.
n
NOTE Third-party URLs are subject to changes beyond the ability of VMware to control. If you find a URL
in VMware documentation that is out of date, notify VMware at docfeedback@vmware.com. You might be
able to locate a third-party document by searching from the third-party home page.
7
Developing Web Views for VMware vCenter Orchestrator
8 VMware, Inc.
Weboperator Web View2
Orchestrator provides a standard Web view called weboperator that allows users to run workflows from a
browser.
The weboperator Web view provides an example of the orchestration functions that Web views can provide
to end users in browsers, without requiring that those users use the Orchestrator client.
Start the Weboperator Web View
You start the weboperator Web view from the Orchestrator client.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
The weboperator Web view and any other Web views that you have imported into Orchestrator appear.
3Right-click weboperator and select Publish.
4Open a browser and go to http://orchestrator_server:8280.
In the URL, orchestrator_server is the DNS name or IP address of the Orchestrator server, and 8280 is the
default port number where Orchestrator publishes Web views.
VMware, Inc.
5On the Orchestrator home page, click Web View List.
6Click weboperator.
7Log in using your Orchestrator user name and password.
8Expand the hierarchical list of workflows to navigate through the workflows in the Orchestrator library.
9Click a workflow in the hierarchical list to display information about the workflow in the right pane.
10 In the right pane, select whether to run the workflow now or at a later time.
OptionAction
Run the workflow now
Run the workflow at a later time
aClick Start Workflow to run the workflow.
b Provide the required input parameters and click Submit to run the
workflow.
a Click Schedule Workflow to run the workflow at a later time.
b Provide the time, date, and recurrence information to set when and
how often to run the workflow and click Next.
cProvide the required input parameters and click Submit to schedule
the workflow.
9
Developing Web Views for VMware vCenter Orchestrator
You can use the weboperator Web view to run workflows on objects in your inventory from a Web browser
rather than from the Orchestrator client.
What to do next
If you only need a Web view to access the inventory and run workflows, the standard weboperator Web
view should meet your requirements. If you require more complex functionality from a Web view, you can
use the Web components and default Web view template that Orchestrator provides to develop custom Web
views.
10 VMware, Inc.
Web View Development Tasks to
Perform in Orchestrator3
You create the Web pages and Web view components that form an Orchestrator Web view by using Web
development tools. You also use the Orchestrator client and configuration interface to perform many of the
steps of Web view development.
When you develop Web views, you use the Orchestrator client to perform tasks such as creating skeleton
Web views, declaring objects in the Orchestrator server as Web view attributes, exporting and importing
files to and from working directories, and creating and using templates to create other Web views. You set
the Orchestrator server to Web view development mode by using the Orchestrator configuration interface.
This chapter includes the following topics:
“Create a Web View Skeleton,” on page 11
n
“Export a Web View as a Template,” on page 12
n
“Create a Web View from a Template,” on page 13
n
“Define a Web View Template as a Resource Element,” on page 14
n
“Create a Web View from a Resource Element Template,” on page 14
n
“Export Web View Files to a Working Folder,” on page 15
n
“Configure the Server for Web View Development,” on page 16
n
“Import Web View Files from a Working Folder,” on page 17
n
“Create a Web View Attribute,” on page 17
n
“Add a Resource Element to a Web View,” on page 18
n
“Disable Web View Development Mode,” on page 19
n
“Publish a Web View,” on page 19
n
Create a Web View Skeleton
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.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click in the white space in the Web view list and select Add web view.
4Type a name for the Web view in the Create Web View text box and click OK.
VMware, Inc.
11
Developing Web Views for VMware vCenter Orchestrator
5Right-click the Web view in the Web view list and select Edit.
The Web view editor opens.
6On 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
https://orchestrator_server:8280/vco/vmo/webview_name/, where orchestrator_serveris the IP
address or DNS name of the machine on which the Orchestrator server is running.
By default, the name of the URL folder matches the Web view name, but you can change this value.
NOTE If the Orchestrator server is running in Web view development mode, the URL folder value must
match the name of the working folder in which you are developing the Web view.
7Click the Version digits to increment the version number for the Web view.
The Version Comment dialog box opens.
8Type a comment for this version of the Web view and click OK.
For example, type Initial creation if you created the Web view.
9On the General tab, type a description of the Web view in the Description text box .
10 Click Save and close to close the Web view editor.
You created a Web view skeleton that does not yet contain any HTML pages or Web view components. If
you export the Web view skeleton to a working folder, the only file it contains is the VSO-WEBVIEW-
INF\.webview.xml file, which sets the Web view name and ID.
What to do next
You must add HTML pages and Web view components to the Web view.
Export a Web View as a Template
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.
When you export a Web view as a template, Orchestrator creates a ZIP file that contains all the files of the
original Web view. You can then create a new Web view that uses these files.
Prerequisites
You must have an existing Web view to export as a template.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click the Web view to export as a template and select Templates > Export as template.
4(Optional) Change the name of the ZIP file as appropriate.
5Select a location on your local system to save the ZIP file and click Save.
You exported the contents of an existing Web view to use as a template from which to create other Web
views.
12 VMware, Inc.
What to do next
Create a new Web view from the template.
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.
Prerequisites
You must have exported an existing Web view to use as a template. Alternatively, you can use the default
Web view template that Orchestrator provides.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click in the white space in the Web view list and select New from > File template.
4Navigate to a Web view template ZIP file and click Open.
Chapter 3 Web View Development Tasks to Perform in Orchestrator
Orchestrator provides a default Web view template at the following location on the Orchestrator server.
OptionAction
If you installed the standalone
version of Orchestrator
5Type a name for the new Web view in the Create Web View dialog box and click OK.
By default, the new Web view name is web_view_template_name_FromTemplate.
6Right-click the Web view in the Web view list and select Edit.
The Web view editor opens.
7On 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
https://orchestrator_server:8280/vco/vmo/webview_name/, where orchestrator_serveris the IP
address or DNS name of the machine on which the Orchestrator server is running.
By default, the name of the URL folder matches the Web view name, but you can change this value.
NOTE If the Orchestrator server is running in Web view development mode, the URL folder value must
match the name of the working folder in which you are developing the Web view.
8Click the Version digits to increment the version number for the Web view.
The Version Comment dialog box opens.
9Type a comment for this version of the Web view and click OK.
For example, type Initial creation if you created the Web view.
VMware, Inc. 13
Developing Web Views for VMware vCenter Orchestrator
10 On the General tab, type a description of the Web view in the Description text box .
11 Click Save and close to close the Web view editor.
You created a new Web view from a Web view template.
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.
Defining a Web view template as a resource element makes it available to all Web view developers who
connect to the Orchestrator server.
Prerequisites
You exported a Web view template ZIP file to define as a resource element.
Procedure
1From the drop-down menu in the Orchestrator client, select Design.
2Click the Resources view.
3Right-click a resource folder in the hierarchical list or the root and select New folder to create a folder in
which to store the resource element.
4Right-click the resource folder in which to import the resource element and select Import resources.
5Select the resource to import and click Open.
Orchestrator adds the resource element to the folder you selected.
You defined a Web view template ZIP file as a resource element that all Web view developers who connect
to the Orchestrator server can use.
What to do next
Create a Web view from a resource element template.
Create a Web View from a Resource Element Template
Instead of creating a Web view from the beginning, you can create a Web view from a resource element
template that you or another developer has imported to the Orchestrator server.
A Web view template ZIP file that a developer has defined as a resource element is available to all
developers who connect to the Orchestrator server.
Prerequisites
Orchestrator must define a Web view template that you or another developer has imported to the server as a
resource element.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click in the white space in the Web view list and select New from > Resource template.
14 VMware, Inc.
Chapter 3 Web View Development Tasks to Perform in Orchestrator
4Press the Enter key in the Filter text box to display a list of all the resource elements that the
Orchestrator server defines.
5Select the Web view template ZIP file from the list of resource elements and click Select.
6Provide an appropriate name for the new Web view in the Create Web View dialog box and click OK.
7Right-click the Web view in the Web view list and select Edit.
The Web view editor opens.
8On 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
https://orchestrator_server:8280/vco/vmo/webview_name/, where orchestrator_serveris the IP
address or DNS name of the machine on which the Orchestrator server is running.
By default, the name of the URL folder matches the Web view name, but you can change this value.
NOTE If the Orchestrator server is running in Web view development mode, the URL folder value must
match the name of the working folder in which you are developing the Web view.
9Click the Version digits to increment the version number for the Web view.
The Version Comment dialog box opens.
10 Type a comment for this version of the Web view and click OK.
For example, type Initial creation if you created the Web view.
11 On the General tab, type a description of the Web view in the Description text box .
12 Click Save and close to close the Web view editor.
You created a new Web view from a Web view template that you or another developer has defined as a
resource element.
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.
Export Web View Files to a Working Folder
When you create a new Web view, either as a skeleton or from a template, you export the Web view files to
a working folder on your local system for editing.
Prerequisites
You must have created a new Web view in the Orchestrator client, either as a skeleton or from a template.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click the Web view in the Web view list and select Export to directory.
4Select the working folder in your local system in which to develop the Web view and click Export.
The working folder in your local system now contains all the HTML, Web view component, image, and
other files of the Web view.
VMware, Inc. 15
Developing Web Views for VMware vCenter Orchestrator
What to do next
You can edit and adapt the Web view files by using Web development tools.
NOTE To preview the Web view from the working folder while you develop it, set the Orchestrator server
to Web view development mode.
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.
NOTE Because Orchestrator publishes Web views from the working folder, you cannot access Web views
that you have not exported to the working folder when the server is in development mode.
Prerequisites
To enable Web view development mode, your working folder must be on the same machine as the
Orchestrator server.
Procedure
1Log in to the Orchestrator configuration interface by using the your Orchestrator configuration
username and password.
For example, go to https://orchestrator_server_DNS_name_or_IP_address:8283 or https://localhost:8283 in a
Web browser.
2On the General tab click Advanced Configuration.
3Select the Enable Web view development mode check box.
4Type the path to the root of your working folder in the text box.
Make sure you provide the path to the root of the working folder. Do not include the name of the folder
that contains the Web view in the path.
For example, if you are working on a Web view in the folder C:\Documents and
Settings\username\Desktop\MyWebView\, type C:\Documents and Settings\username\Desktop\ as the
path.
5Click Apply changes.
6On the Startup Options tab, click Restart Service to restart the Orchestrator server in Web view
development mode.
7After the Orchestrator server has restarted, start the Orchestrator client and log in.
8Click Web Views.
9Verify 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.
aIf the Web view is running, right-click the Web view and select Unpublish.
bRight-click the Web view and select Edit.
cOn the General tab of the Web view editor, type the name of the working folder in the URL folder
text box, and click Save and Close to close the Web view editor.
16 VMware, Inc.
Chapter 3 Web View Development Tasks to Perform in Orchestrator
10 Right-click the Web view and select Publish.
You set the Orchestrator server to Web view development mode, in which you can preview a Web view
from your working folder while you develop it.
Import Web View Files from a Working Folder
After you edit the files of a Web view in the working folder, you must import them back to the Web view in
the Orchestrator server.
Prerequisites
Verify that you exported the files of a Web view to a working folder and edit them using Web development
tools.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click the Web view in the Web view list and select Edit.
4Click the Elements tab in the Web view editor.
5Click Import from directory.
6Select the working folder in your local system from which to import the modified Web view files and
click Import.
7Click Save and Close to exit the Web view editor.
You imported to the Web view in the Orchestrator server the Web view files that you modified on your local
system.
What to do next
Create Web view attributes.
Create a Web View Attribute
With Web view attributes, you can pass objects to Web view components. The functions that the Web view
components define act on these objects to perform the orchestration actions that you run from the Web view.
A Web view attribute can be an object of any type that the Orchestrator API supports. For example, a Web
view attribute can be a VC:VirtualMachine object. A Web view component can define a function that
requires this object as an attribute. For example, when a user clicks a button in a Web view, a Web view
component associated to that button runs a workflow that starts a virtual machine. A Web view attribute
provides the virtual machine object to the workflow that the Web view component starts.
Prerequisites
Create or import a Web view in the Orchestrator client.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click the Web view and select Edit.
4Click the Attributes tab in the Web view editor.
VMware, Inc. 17
Developing Web Views for VMware vCenter Orchestrator
5Right-click in the Attributes tab and select Add attribute.
6Click the attribute name and type a name.
7Click the attribute Type link and select the attribute type from the list.
8Click the attribute Value link and type or select the value of the attribute.
You type or select the attribute value depending on the type of the attribute.
9Click Save and Close to exit the Web view editor.
You defined attributes that direct the Web view to the objects in the Orchestrator server on which it
performs tasks.
What to do next
Add a resource element to a Web view.
Add a Resource Element to a Web View
Resource elements are external objects that you can import into the Orchestrator server for Web views to use
as Web view attributes. Web view attributes identify objects with which Web view components interact.
Prerequisites
Verify that you have the following objects in your Orchestrator server:
An image, script, XML, or HTML file, or any other type of object imported into Orchestrator as a
n
resource element.
A Web view that requires the resource element as an attribute.
n
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3If the Web view is running, right-click the Web view to which you want to add the resource element
and select Unpublish.
4Right-click the Web view and select Edit.
5Click the Attributes tab.
6Right-click within the Attributes tab and select Add attribute.
7Click the attribute name and type a new name for the attribute.
8Click Type to set the attribute type.
9In the Select a type dialog box, type resource in the Filter box to search for an object type.
OptionAction
Define a single resource element as
an attribute
Define a folder that contains
multiple resource elements as an
attribute
Select ResourceElement from the list.
Select ResourceElementCategory from the list.
10 Click Value and type the name of the resource element or category of resource elements in the Filter
text box.
18 VMware, Inc.
11 From the proposed list, select the resource element or a folder containing resource elements and click
Select.
12 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.
Disable Web View Development Mode
If you set the Orchestrator server to Web view development mode during the development process, you
must set the Orchestrator server back to its normal mode before you can publish the Web view.
Prerequisites
You must have set the Orchestrator server to Web view development mode and finished modifying the Web
view files in your working folder.
Procedure
1Log in to the Orchestrator configuration interface by using the your Orchestrator configuration
username and password.
For example, go to https://orchestrator_server_DNS_name_or_IP_address:8283 or https://localhost:8283 in a
Web browser.
Chapter 3 Web View Development Tasks to Perform in Orchestrator
2On the General tab click Advanced Configuration.
3Deselect the Enable Web view development mode check box.
4Click Apply changes.
5On the Startup Options tab click Restart Service to restart the Orchestrator server in normal mode.
You disabled Web view development mode. Orchestrator now publishes Web views from the Orchestrator
server, rather than from the working folder.
What to do next
Publish the Web view.
Publish a Web View
When you finish Web view development and import the modified files to the Web view in the Orchestrator
server, you can publish the Web view.
Prerequisites
You must have a Web view that is ready for publishing. You must also have disabled Web view
development mode.
Procedure
1From the drop-down menu in the Orchestrator client, select Administer.
2Click the Web Views view.
3Right-click the Web view to publish and select Publish.
Orchestrator publishes the Web view at https://orchestrator_server:
8280/vco/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.
VMware, Inc. 19
Loading...
+ 43 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.