The plugin manifest converter tool helps in converting your local plugin's manifest file (plugin.xml) to the remote plugin's
manifest format (plugin.json). The converter tool migrates the configuration of all the supported extensions from XML format to JSON format.
This tool supports the latest SDK version of the plugin.xml manifest file for conversion.
In addition to converting the plugin manifest file, the converter tool does the following conversions:
Plugin XML extensions | Plugin JSON mappings |
---|---|
Global extensions:
|
{ "global": { "view": { "navigationId": "com.vmware.samples.htmlsample.welcomeView", "uri": "resources/datacenterSummary.html?title=DatacenterSummaryV1", "navigationVisible": true } } } |
Object Summary view extensions:
|
{ "objects": { "VirtualMachine": { "summary": { "view": { "uri": "resources/view1" } } } } } |
Configure extensions:
|
{ "objects": { "VirtualMachine": { "configure": { "views": [ { "labelKey": "vmConfigureViewTitle1", "uri": "resources/view1" }, { "labelKey": "vmConfigureViewTitle2", "uri": "resources/view2" } ] } } } } |
Monitor extensions:
|
{ "objects": { "VirtualMachine": { "monitor": { "views": [ { "labelKey": "vmMonitorViewTitle1", "uri": "resources/view1" }, { "labelKey": "vmMonitorViewTitle2", "uri": "resources/view2" } ] } } } } |
Actions
|
{ "objects": { "VirtualMachine": { "menu": { "actions": [ { "labelKey": "vm.action.label", "icon": { "name": "action-1" }, "trigger": { "type": "modal", "uri": "index.html?view=vm-action-modal", "titleKey": "vm.action.modal.title", "size": { "width": 600, "height": 250 } } } ] } } } } |
I18n resources:
Resource file links were part of plugin.xml
for e.g.,
<resources baseUrl="locales/"> <resource> com_vmware_samples_templateextensions </resource> </resources> |
{ "definitions": { "i18n": { "locales": [ "en-US", "de-DE", "fr-FR" ], "definitions": { "RemoteSample:plugin.name": { "en-US": "vSphere HTML SDK Plugin", "de-DE": "vSphere HTML SDK Plugin", "fr-FR": "vSphere HTML SDK Plugin" } } } } } |
Icons were added as part of css or style configurations. |
Icon sprite sheet
{ "definitions": { "iconSpriteSheet": { "uri": "assets/images/sprites.png", "definitions": { "action-1": { "x": 0, "y": 0 }, "action-2": { "x": 0, "y": 32 } } } } } |
Option | Alias | Description |
---|---|---|
--projectDir | -p | Required path to the project directory which contains the plugin.xml, MANIFEST.MF, locale properties files and plugin's css and images. |
--outputDir | -o |
Optional path to the output directory where the converted plugin.json, sprite image file and report.txt file are placed.
If this option is not specified then the converted files will be placed in the project directory specified with --projectDir or -p option. |
--sdkVersion | -v | Optional property to specify the target SDK version for the manifest conversion. The default value is the initial SDK version "1.0.0". |
--help | -h | Provides help on the input options. |
The following files will be generated and placed in the output directory provided in the --outputDir or -o option by running the plugin manifest converter tool,
./plugin-manifest-converter.sh --projectDir [path to the project directory] --outputDir [path to the output directory]
plugin-manifest-converter.bat --projectDir [path to the project directory] --outputDir [path to the output directory]