Manifests
This page is now retired and kept for archival purposes. This programming guide has been published on MSDN at http://msdn.microsoft.com/library/jj860311.aspx
The information in this topic applies only to System Center 2012 SP1.
The add-in package manifest is an XML file that describes the add-ins the package provides for the Virtual Machine Manager (VMM) console. It contains the name of the author, a simple description of the add-in package, and every individual add-in.
Basic information
The manifest starts with the root XML node ConsoleAddIn. The root node contains seven possible attributes, some of which are required. The following table describes the possible attributes for the root node:
Attribute Name | Value Type | Required | Description |
---|---|---|---|
Name |
string |
Yes |
The name of the add-in package. |
Version |
string |
Yes |
The version of the add-in package. The string supplied here is converted into the System.Version equivalent. Therefore, the value here must be compatible with that class. |
Author |
string |
Yes |
The name of the author who created this add-in package. |
Description |
string |
No |
A simple description of the add-in package. |
TrustLevel |
string |
No |
Represents the trust level this add-in package requires. The possible values are as follows: Full, Medium, Minimal. Currently, this is not used by the VMM console and the add-in system does not respect nor define the restrictions around each value. The value of Full should be used until this is clearly defined. |
FolderName |
string |
Yes |
The sub-folder the add-in package will be installed to in the VMM console’s add-in folder. This value is also the unique identifier that differentiates your add-in package from all other add-in packages. |
Manifest Add-ins
An add-in defined by the manifest is a definition of something exposed through the console. One or more add-ins must be defined by package manifest. There are two types of add-ins that you can define: an action or a view. An action add-in represents a ribbon button which you can respond to when the console user clicks on it. A view add-in represents a ribbon button when clicked display a UI view in the console. The ribbon entry is defined by the action or view add-in.
Each add-in also defines which VMM console nodes it will display with. For example, designing a view add-in to target the Storage Array node will cause the button to appear on the ribbon when the Storage Array node is selected in the console. This represents the targeted context of the add-in.
Actions
Actions are defined by creating an XML node named ActionAddIn and adding it as a child of the root XML node. This node describes the action to be invoked when the ribbon button is clicked. The action can optionally be configured to appear in the shortcut menu of the objects it targets. The following table describes the attributes an action XML node defines:
Attribute Name | Value Type | Required | Description |
---|---|---|---|
Name |
string |
Yes |
The name of the add-in. If the ActionType attribute is set to Code, this name must match the name of a System.Addin.AddinAttribute attribute defined in the assembly referenced by the AssemblyName attribute. |
Contexts |
string |
Yes |
Identifies the ribbons that this button will appear on. Multiple ribbons can be targeted by separating each entry with a space. You can make the button appear on every home tab by using the value AllHomeTabs. |
ShowInContextMenu |
boolean |
No |
When True, displays the ribbon entry in the right-click shortcut menu of the supported object types. |
Icon |
string |
No |
The icon to display in the ribbon. If omitted, a default icon will be provided. |
ActionType |
string |
Yes |
The type of action to perform when the ribbon button is clicked. The following list describes the possible values:
|
ActionParam |
string |
See description. |
The URL or application path and file name. This attribute is only required when the ActionType attribute is set to URL or Application. |
AssemblyName |
string |
See description. |
The file name of the assembly to load without specifying the extension. For example: MyCompany.MyAddinFile.dll would be MyCompany.MyAddinFile. This attribute is only required when the ActionType attribute is set to Code. |
The ActionAddIn XML node also takes a single child XML node named ButtonLabel. This node accepts text as its content which is displayed in the console on the ribbon button or the shortcut menu.
Views
Views are defined by creating an XML node named ViewAddIn and adding it as a child of the root XML node. This node describes the view to be displayed when the ribbon button is clicked. The following table describes the attributes a view XML node defines:
Attribute Name | Value Type | Required | Description |
---|---|---|---|
Name |
string |
Yes |
The name of the add-in. This name must match the name of a System.Addin.AddinAttribute attribute defined in the assembly referenced by the AssemblyName attribute. |
AssemblyName |
string |
Yes |
The file name of the assembly to load without specifying the extension. For example: MyCompany.MyAddinFile.dll would be MyCompany.MyAddinFile. |
Contexts |
string |
Yes |
Identifies the ribbons that this button will appear on. Multiple ribbons can be targeted by separating each entry with a space. You can make the button appear on every home tab by using the value AllHomeTabs. |
Icon |
string |
No |
The icon to display in the ribbon. If omitted, a default icon will be provided. |
The ViewAddIn XML node also takes a single child XML node named ButtonLabel. This node accepts text as its content which is displayed in the console on the ribbon button or the shortcut menu.
Context Values
Each add-in defined in a manifest has a Contexts XML attribute. The context value specified will determine which console nodes the ribbon button for the add-in will appear. This attribute must contain one more valid context values. To specify more than one context, separate each context value with a space. The following list groups the contexts based on the types of objects they work with. Only the values in bulleted lists can be used:
Managed Computer Types
- Host
- Cluster
Virtualization Types
- HostGroup
- Cloud
- VM
- Service
Storage Types
- StorageArray
- StoragePool
- StorageClassification
- StorageProvider
- StorageLogicalUnit
Networking Types
- LogicalNetwork
- MacAddressPool
- LoadBalancer
- VipTemplate
- IpPool
All Object Types
If you specify AllHomeTabs as a context value, the ribbon entry will appear for all object types.
See Also
[[Architecture Concepts]]
[[Context Object Types]]
[[Base Classes]]