Actions are invoked in the vSphere Web Client and the vSphere Client from menus or toolbars. The actions extension points allow you to add actions to global or contextual menus, and to prioritize the placement of actions within menus and toolbars.

vise.actions.sets

Flex Client

HTML Client

Compatibility

yes

yes

Defines a set of actions, each of which is represented by the class ActionSpec.

Requires a data object of type ActionSpec with available properties:

uid - action ID.

label - user-visible action label.

actionUrl - URL of the action target.

dialogTitle - target dialog title.

dialogSize - target dialog width and height.

Accessibility: {object} → {menu} → {plugin sub-menu}

Example:

<extension id="com.vmware.samples.vspherewssdk.vmActionSet">
   <extendedPoint>vise.actions.sets</extendedPoint>
   <object>
      <actions>
         <com.vmware.actionsfw.ActionSpec>
            <uid>com.vmware.samples.vspherewssdk.myVmAction1</uid>
            <label>#{action1.label}</label>
            <delegate>
               <className>com.vmware.vsphere.client.htmlbridge.HtmlActionDelegate</className>
               <object><root>
                  <actionUrl>/vsphere-client/vspherewssdk/resources/vm-action-dialog.html</actionUrl>
                  <dialogTitle>#{action1.label}</dialogTitle>
                  <dialogSize>500,250</dialogSize>
               </root></object>
            </delegate>
         </com.vmware.actionsfw.ActionSpec>
      </actions>
   </object>
   <metadata>
      <objectType>VirtualMachine</objectType>
   </metadata>
</extension>

vmware.prioritization.actions

Flex Client

HTML Client

Compatibility

yes

no

Defines and prioritizes actions in object menus and the object list toolbar.

Requires a data object of type com.vmware.actionsfw.model.ActionPriorityGroup.

Accessibility: {object list} → {action button bar} and {list menu}

vmware.prioritization.listActions

Flex Client

HTML Client

Compatibility

yes

yes

Defines and prioritizes global list actions (not related to a particular object).

Requires a data object of type ActionPriorityGroup with available properties:

prioritizedIds - list of action IDs to declare as global.

Note: the order of global action IDs is taken into account only in the vSphere Web Client (Flex). The vSphere HTML Client does not support action prioritization.

regionId - ID of the extension that contains the global actions.

Accessibility: {object list} → {action button bar} and {list menu}

Example:

<extension id="com.vmware.sample.chassis.listAction">
   <extendedPoint>vmware.prioritization.listActions</extendedPoint>
   <object>
      <prioritizedIds>
         <String>com.vmware.samples.chassisa.createChassis</String>
      </prioritizedIds>
      <regionId>com.vmware.samples.chassisa.list</regionId>
   </object>
</extension>

vsphere.core.menus.solutionMenus

Flex Client

HTML Client

Compatibility

yes

yes

Defines a custom sub-menu including actions, separators, and nested menus.

Requires a data object of type ActionMenuItemSpec with available properties:

uid - menu item ID.

type - type of menu item. Supported values are "menu", "action" and "separator".

label - (optional) user-visible label of the menu item.

If omitted and the type is "action", the label defined in the action declaration will be used.

icon - (optional) 18x18 icon resource ID.

If omitted and the type is "action", the icon defined in the action declaration will be used.

children - (optional) array of child menu items (ActionMenuItemSpec) if the type is "menu".

Accessibility: {object} → {menu}

Example:

<extension id="com.vmware.samples.vspherewssdk.vmMenu">
   <extendedPoint>vsphere.core.menus.solutionMenus</extendedPoint>
   <object>
      <label>WSSDK menu</label>
      <children>
         <Array>
            <com.vmware.actionsfw.ActionMenuItemSpec>
               <type>action</type>
               <uid>com.vmware.samples.vspherewssdk.myVmAction1</uid>
            </com.vmware.actionsfw.ActionMenuItemSpec>
            <com.vmware.actionsfw.ActionMenuItemSpec>
               <type>separator</type>
            </com.vmware.actionsfw.ActionMenuItemSpec>
            <com.vmware.actionsfw.ActionMenuItemSpec>
               <type>action</type>
               <uid>com.vmware.samples.vspherewssdk.myVmAction2</uid>
            </com.vmware.actionsfw.ActionMenuItemSpec>
         </Array>
      </children>
   </object>
   <metadata>
      <objectType>VirtualMachine</objectType>
   </metadata>
</extension>