When you create a solution, you can add tabs that appear in Solutions Manager to allow users to configure the solutions and to access the functions of the solution in the vSphere web client.

You define the content of tabs as dynamic Web pages that you make available to Solutions Manager in an application server. For example, you can define tabs that allow you to perform the following kinds of actions in Solutions Manager.

Configure the solution.

Trigger events in the solution application or in vCenter Server.

Deploy predefined virtual machines or vApps of different types.

Monitor the solution application or the virtual machines that it deploys.

Uninstall the solution and remove its virtual machines.

You add tabs to Solutions Manager by implementing the ExtSolutionManagerInfoTabInfo data object in the program that manages the solution. You set properties in ExtSolutionManagerInfoTabInfo to provide a label for the tabs and a URL to the dynamic Web pages that provide the content of the tabs. You create one ExtSolutionManagerInfoTabInfo instance for each tab that you add to Solutions Manager. You pass that instance to ExtSolutionManagerInfo in an array.

How you define the content of the tabs depends on the function of the application that the solution adds to vCenter Server.

The EAM Sample Solution adds the following tabs to Solutions Manager.

With the Configuration tab, you can deploy ESX agents on the hosts that vCenter Server manages and to suspend, restart, and uninstall the solution. You find the implementation of the EAM Sample Solution Configuration tab in eam_working_folder\src\com\vmware\eam\sample\solution\ui.

Elements of the EAM Sample Solution Configuration Tab

File

Description

ConfigModel.java

Defines the actions of the Configuration tab by calling methods that Manager.java and AgentHandler.java define.

ConfigController.java

Constructs the Web page that appears on the Configuration tab from the eam_working_folder\war\WEB-INF\jsp\config.jsp file.

With the Management tab, you can monitor the status of the ESX agents that the solution deploys. The Management tab pulls information from ESX Agent Manager from a standard URL that ESX Agent Manager publishes.

The EAM Sample Solution implements ExtSolutionManagerInfoTabInfo in the Manager.java class.

Download the vSphere ESX Agent Manager SDK.

Verify that you have set up and started the EAM Sample Solution in an application server.

Verify that you have opened eam_work_folder\src\com\vmware\eam\sample\solution\Manager.java in an editor.

Examine the code of the ConfigController.java and ConfigModel.java classes and the config.jsp file to see how they expose the functions of the Configuration tab to the EAM Sample Solution.

1

Create an instance of ExtSolutionManagerInfo in the program that manages the solution.

The following lines in the Manager.java class show how the EAM Sample Solution creates an instance of ExtSolutionManagerInfo.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  [...]
}
2

Create an instance of ExtSolutionManagerInfoTabInfo to contain the name of the tab and a link to the Web page that defines its contents.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  ExtSolutionManagerInfoTabInfo extSolutionManagerInfoTabInfo = 
    new ExtSolutionManagerInfoTabInfo();
  [...]
}
3

Call the ExtSolutionManagerInfoTabInfo.setLabel() method to provide a name for the tab.

Manager.java names the first tab Configuration.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  ExtSolutionManagerInfoTabInfo extSolutionManagerInfoTabInfo = 
    new ExtSolutionManagerInfoTabInfo();
  extSolutionManagerInfoTabInfo.setLabel("Configuration");
  [...]
}
4

Call the ExtSolutionManagerInfoTabInfo.setUrl() method to provide a URL to the Web page that defines the contents of the tab.

Manager.java uses the config.html Web page to define the contents of the Configuration tab. Manager.javacontains the _url object that constructs the root of the EAM Sample Solution URLs from the vCenter Server information that you provide in eamri.properties when you start the EAM Sample Solution.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  ExtSolutionManagerInfoTabInfo extSolutionManagerInfoTabInfo = 
    new ExtSolutionManagerInfoTabInfo();
  extSolutionManagerInfoTabInfo.setLabel("Configuration");
  extSolutionManagerInfoTabInfo.setUrl(_url.toString() +
    "/config.html");
  [...]
}
5

Add the tab to the array of ExtSolutionManagerInfoTabInfo instances that define the tabs for the solution in the ExtSolutionManagerInfo object.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  ExtSolutionManagerInfoTabInfo extSolutionManagerInfoTabInfo = 
    new ExtSolutionManagerInfoTabInfo();
  extSolutionManagerInfoTabInfo.setLabel("Configuration");
  extSolutionManagerInfoTabInfo.setUrl(_url.toString() +
    "/config.html");
  extSolutionManagerInfo.getTab().add(extSolutionManagerInfoTabInfo);
  [...]
}
6

(Optional) Add more instances of ExtSolutionManagerInfoTabInfo to the array to add more tabs to Solutions Manager.

Manager.java adds a second tab, Management, that pulls information from the URL on which ESX Agent Manager exposes information about the ESX agencies that a solution deploys.

private Extension createExtensionObject() { 
  Extension extension = new Extension();
  [...]
  ExtSolutionManagerInfo extSolutionManagerInfo = 
    new ExtSolutionManagerInfo();
  [...]
  extSolutionManagerInfoTabInfo = 
    new ExtSolutionManagerInfoTabInfo();
  extSolutionManagerInfoTabInfo.setLabel("Management");
  extSolutionManagerInfoTabInfo.setUrl("https://" +
                            _vimConnection.getHost() + ":" +
                            _vimConnection.getHttpsPort() +
                            "/eam/management/ui/?solution=" + 
                            EXTENSION_KEY);
  extSolutionManagerInfo.getTab().add(extSolutionManagerInfoTabInfo);
  [...]
}

You added solution-specific tabs to Solutions Manager, that appear when the solution registers with vCenter Server.

Set up health monitoring for the solution and the objects that it manages.