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.Before 8.0 U3, it was possible for a multi
manifest with a
vsphere.client
and/or vcenter.server
requirements specification to be parsed and chosen for deployment, despite being
incompatible with vSphere Client and/or vCenter Server requirements. This caused the
plug-in to appear as Incompatible.As of vSphere 8.0 U3, plug-in environment
requirements are processed as part of plug-in manifest parsing and if they are not
satisfied, parsing of the current file fails, causing the platform to try the subsequent
plug-in manifest file in the queue.
Start by creating two or more manifest files, each conforming to the schema of a
supported feature set. For instance,
plugin-80.json
excludes a
feature deprecated in vSphere Client 7.0, while plugin-70.json
includes that feature. After you test your manifest files separately, create a list of
their file names as a JSON object named manifests
and store it in a
file named plugin-multi-manifest.json
:{ "manifestVersion": "1.0.0", "manifests": [ "plugin-80.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.Multi-manifest support was added in
vSphere 7.0 U1. To support versions before 7.0 U1 and a multi-manifest after 7.0 U1,
you must add a manifest for all versions before 7.0 U1 in a
plugin.json
and place it inside of the Zip archive. This
way, versions before 7.0 U1 use the plugin.json
whereas
versions after 7.0 U1 process the multi-manifest JSON. The first one that is parsed
correctly will be used.