Context Menu Service consolecli commands

consolecli commands for working with the Context Menu Service (CMS).

Exporting CMS data

There are two menu element types available in cms.xml:

System menu
Menus generated by deploying an application are called system menus.
Custom menu
Menus added through a Representational State Transfer (REST) service are called custom menus. The export function migrates only custom launch entries from cms.xml.

Exported CMS data includes two files:

cms.xml
This file when exported, contains all the custom launch entry details from the original cms.xml. The exported cms.xml is formatted slightly different from the original cms.xml in order for it to be imported more easily.
navigation.xml
Some details for launch entries are stored in navigation.xml, for example, wscRole, wscRoleType, and launchType. The exported navigation.xml contains only details from the original navigation.xml that relate to the custom launch entries exported in cms.xml

CMS export command

CMSExport --dir export_directory

where export_directory is the location where you want the output files to be saved.

For example:

Windows operating systemsDASH_HOME\bin\consolecli.bat CMSExport --dir C:\cms_ei

Once the command completes, a file called cms.zip is created in the export_directory that you specified. cms.zip contains all the exported CMS data, which can be subsequently imported to another instance of Dashboard Application Services Hub.

Importing CMS data

Exported CMS data can be subsequently imported to another Dashboard Application Services Hub instance.

CMS import command

CMSImport --username console_username --password console_user_password --dir import_directory

Where:

  • --dir import_directory specifies the directory that contains the cms.zip file that was copied from the export_directory on the source Dashboard Application Services Hub instance.
    Note: If you omit the --dir argument from the command, you can provide the export_directory path in interactive mode.
  • --username console_username --password console_user_password specifies a valid username and password for theDashboard Application Services Hub instance.
    Note: If you omit the --username and --username arguments from the command, you must provide the console_username and console_user_password in interactive mode.

For example:

Windows operating systemsDASH_HOME\bin\consolecli.bat CMSImport --dir C:\cms_ei

Once the command completes, CMS data is imported into the Dashboard Application Services Hub environment and the relevant menus are updated.

Importing using a properties file

You can also optionally use a --settingsFile settings_file properties file with the CMSImport command to create a CMS datasource and update consoleProperties.xml.