Overview

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:

  • Supported global and object related extension points which includes summary tab, configure tab, monitor tab and action menus extensions.

  • The tool also parses the locale.properties files and copies the plugin specific locale properties to the plugin.json manifest file.

  • The tool also parses the plugin's CSS file to create a single sprite image of all the plugin specific icon images.

    The plugin specific icon images are of size 32 x 32 px and the tool provides support for migrating icons of type for example, PNG, SVG (version 1.2) and so on.

    Note:

    Support for migrating SVG files of version 1.1 is not provided by the tool.

The tool does not support:

  • HTML Bridge-specific extensions of the plugin.xml manifest file.

  • Property conditions and privilege constraints on the metadata of an extension as it is not supported in the SDK.

Local plugin extension to Remote plugin json mappings

The following table represents the local plugin extensions to remote plugin JSON mappings

Plug-In XML Extensions

Plug-In JSON Mappings

Global extensions:

  • vise.global.views

  • vise.navigator.nodespecs

  • vise.home.shortcuts

{
   "global": {
     "view": {
       "navigationId": com.vmware.samples.htmlsample.welcomeView",
       "uri": "resources/datacenterSummary.html?title=DatacenterSummaryV1",
       "navigationVisible": true
     }
   }
 }

Object Summary view extensions:

  • ${namespace}.summarySectionViews

{
   "objects": {
     "VirtualMachine": {
       "summary": {
         "view": {
           "uri": "resources/view1"
         }
       }
     }
   }
 }

Configure extensions:

  • ${namespace}.manageViews

  • ${namespace}.settingsViews

{
   "objects": {
     "VirtualMachine": {
       "configure": {
         "views": [
           {
             "labelKey": "vmConfigureViewTitle1",
             "uri": "resources/view1"
           },
           {
             "labelKey": "vmConfigureViewTitle2",
             "uri": "resources/view2"
           }
         ]
       }
     }
   }
 }          

Monitor extensions:

  • ${namespace}.monitorViews

{
   "objects": {
     "VirtualMachine": {
       "monitor": {
         "views": [
           {
             "labelKey": "vmMonitorViewTitle1",
             "uri": "resources/view1"
           },
           {
             "labelKey": "vmMonitorViewTitle2",
             "uri": "resources/view2"
           }
         ]
       }
     }
   }
 }       

Actions

  • vise.actions.specs

{
   "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 example.

<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
         }
       }
     }
   }
 }

The following templates/ extensions are not supported in the remote plugin.json,

  • Custom object template is not supported.

  • ${namespace}.configureCategory extension is not supported.

  • ${namespace}.monitorCategory extension is not supported.

  • ${namespace}.manageCategories extension is not supported.

  • ${namespace}.HtmlPluginHeadlessAction class is not supported.

  • More than one global view is not supported

Tool Options

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.

Tool Output

The following files will be generated and placed in the output directory provided in the --outputDir or-ooption by running the plugin manifest converter tool,

  1. plugin.json - The migrated plugin.json manifest file.

  2. sprite-image.png - The single sprite image consisting of all the plugin specific icons used in the extensions.

    • After you run the converter tool, copy the sprite file from the output directory to its recommended location in the assets/images directory, and modify plugin.json to specify its location relative to the plugin.json file.
  3. report.txt - Information or warning for the unsupported extensions used in local plugin.xml manifest file which have not been converted by the plugin manifest converter tool.

Sample commands

Linux

./plugin-manifest-converter.sh --projectDir [path to the project directory] --outputDir [path to the output directory]

Windows

plugin-manifest-converter.bat --projectDir [path to the project directory] --outputDir [path to the output directory]
check-circle-line exclamation-circle-line close-line
Scroll to top icon