Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vco-cli.jar help

vCO Package import/export command line tool

Description:

Command line tool, that provides basic vCO package import and export operations. As source or target it can have either .package file, or directory.

Usage:

java <java-parameters> -jar PackageToolCli.jar <command> <command-parameters>

Commands:

These are the basic commands that tell the tool which operation to perform.

  • fi - file import
    • Imports package to vCO from .package file.
  • fe - file export
    • Exports vCO package to .package file.
  • di - directory import
    • Imports package to vCO from directory tree.
  • de - directory export
    • Exports vCO package to directory tree.
  • fd - file from directory
    • Creates .package file from directory tree.

Command Parameters:

The direct parameters that pertain to the specific command. Source or destination files or directories.

  • fi
    • - Name of the .package file to import.
  • fe
    • - Name of the package to export.
    • - Directory to which to export. If not specified, current directory is assumed.
  • di
    • - Directory from which to import.
  • de
    • - Name of the package to export.
    • - Directory to which to export. If not specified, current directory is assumed.
  • fd
    • - Directory from which to build .package file.

##Java Parameters: Additional parameters that may be needed by the system, in order to perform the specific commands.

  • -DserverUrl=user:password@serverurl
    • URL and login of the vCO server against which the imports or exports will be performed.
  • -DallowedMask=
    • Access attributes of the package.
    • v - elements can be viewed
    • e - elements can be edited
    • f - elements can be forwarded in another package
  • -DkeystoreFileLocation=
    • Path to the .vmokeystore file that contains the development certificate
  • -DkeystorePassword=
    • Password of the .vmokeystore file
  • -DexportVersionHistory=<true|false>
    • Export version history
  • -Dincludes=
    • ';'-separated list of patterns showing which elements to include.
  • -Dexcludes=
    • ';'-separated list of patterns showing which elements to exclude.

Examples:

Export package com.vmware.test.TestPackage as a package file in the current folder.

java -DserverUrl=username:password@myserver:8281 -jar PackageToolCli.jar fe com.vmware.test.TestPackage

Export package com.vmware.test.TestPackage as directory structure in the current folder.

java -DserverUrl=username:password@myserver:8281 -jar PackageToolCli.jar de com.vmware.test.TestPackage

Import package file com.vmware.test.TestPackage.package to vCO server.

java -DserverUrl=username:password@myserver:8281 -jar PackageToolCli.jar fi com.vmware.test.TestImpex.package

(Note: the next two commands require development certificate in order to be performed)

Build .package file from directory structure.

java -DserverUrl=username:password@myserver:8281 -DkeystoreFileLocation=/path/to/my_cerificate.vmokeystore
       -DkeystorePassword=mypassword -jar PackageToolCli.jar fd com.vmware.test.TestPackage

Import package directory structure com.vmware.test.TestPackage to vCO server.

java -DserverUrl=username:password@myserver:8281 -DkeystoreFileLocation=/path/to/my_cerificate.vmokeystore
     -DkeystorePassword=mypassword -jar PackageToolCli.jar di com.vmware.test.TestPackage

The last two commands also support the allowedMask, exportVersionHistory and includes/excludes java parameters, which give more control to the content and access attributes of the package. -DallowedMask=vf Creates package that can not be editted. -DexportVersionHistory=true Preserves the local version history of developed vCO objects between exports and imports. -Dincludes="/Test Package//.element_info.xml;/Test Samples//.element_info.xml;/testPackage//*.element_info.xml" Includes only objects that have ".element_info.xml" descriptor (which is specific for packages exported as directory trees), from library folders Test Package and Test Samples (for workflows) or testPackage package (for actions).

@jibanezvela

This comment has been minimized.

Copy link

commented Jan 25, 2019

Any option to "verbose mode" ?
I'm getting "null" as a error message. :(

@kuklis

This comment has been minimized.

Copy link

commented May 8, 2019

You may need to add -DignoreServerCertificate=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.