Remote Plug-in Multi-Manifest Support
You can create a remote plug-in capable of supporting different vSphere Client feature sets. To deploy this plug-in, you specify different manifest files to match the feature sets. The vSphere Client will choose a manifest compatible with the schema it supports.
You should use the multi-manifest feature
when you want a single plug-in version to support different feature sets in the vSphere
Client or different capabilities in the JavaScript API. The plug-in user interface code
can check the existence of API methods or invoke app.getClientInfo()
to
determine which feature set the vSphere Client makes available.
Start by creating two or more manifests as separate files, each file conforming to the schema that belongs to a supported feature set. For instance, you could create a plugin-67.json file that supports only vSphere Client 6.7 features; a plugin-70.json file that excludes a feature deprecated in vSphere Client 7.0, and a plugin-70u1.json file that includes a feature added in vSphere Client 7.0 Update 1.
manifests
. Store the JSON in a file named
plugin-multi-manifest.json. See the following
example:{ "manifests" : [ "plugin-70u1.json", "plugin-70.json", "plugin-67.json" ] }
The manifests
object
conforms to a separate multi-manifest schema, such that the manifest parser treats it as
an ordered list. The parser tries to validate each manifest file in turn for
compatibility with vsphere-ui
.. The first file that conforms to the
parser's standard manifest schema is the manifest that the vSphere Client uses for the
plug-in.
Then create a zip file containing the plugin-multi-manifest.json file and the supported manifest files for different feature sets that the plug-in supports. All the files must be at the root of the zip file, rather than in subdirectories. The zip file can have any name you choose.
Finally, register the plug-in with a vCenter
Server instance. Use the name of the zip file as the --pluginUrl
argument to the registration script or as the client.url
property in
the vCenter Server extension record that your registration tool creates.