Develop > Command-Line Interfaces > ContentManager Command–Line Interface

ContentManager Command-Line Interface

This section describes the options and parameters available in the ContentManager command-line interface.

Note The appropriate identity assurance software (for example, ActivIdentity) must be installed to be able to authenticate using a smart card when executing the ContentManager command-line interface.

When connecting to OMi servers using Remote Desktop Connections, the client system must also have the appropriate identity assurance software, such as ActivIdentity, installed to be able to authenticate using a smart card attached to the client system when executing the ContentManager command-line interface remotely.

In addition, in the Remote Desktop Connections dialog box, select More Show Options > Local Resources > More to open the Local devices and resources dialog box. Ensure that the Smart Cards checkbox is selected.

Location

<OMi_HOME>/bin/ContentManager

Synopsis

ContentManager <Operation> [Connection] <UserCredentials> [Option]

  • Operation (one of the following):

    Import Operations:

    -import <in_file> [-test]

    Export Operations:

    -snapshot -output <out_file>

    -export <name> -output <out_file>

    [-contentPackVersion <version>] [-asPredefined]

    Miscellaneous Operations:

    -list

    -delete <name> [-contentPackVersion <version>]

    -version

  • Connection (one of the following):

    -url <URL>

    -server <gatewayserver> [-port <port>] [-ssl]

  • User Credentials:

    -username <login name> [-password <password>]

  • Option:

    -verbose

Options

Option

Description

-asPredefined

Marks the exported Content Pack as predefined.

-cpv,-contentPackVersion <version>

Version number of the Content Pack Definition

-d,-delete <content_pack_name>

Deletes the content pack definition specified in <content_pack_name>. It does not delete the content pack’s content. Content includes definitions for event type indicators, health indicators, calculation rules for key performance indicators (KPI), topology-based correlation rules, tool definitions, view mappings, and graph families.

-e,-export <content_pack_name>

Exports the named content pack definition and its content to the file specified using the -output option.

-f,-force Overwrites an existing export or snapshot output file.

-h,-help

Displays a summary of the command options and exits.

-i,-import <input_file>

Imports the content pack definition and its content from the specified file.

Importing a custom content pack overwrites the existing objects. Importing a predefined content pack overwrites all none-customized objects.

-j, -jks <arg>

If OMi is configured for TLS mutual authentication, this option can be used to specify the Java keystore to be used for authentication. The keystore must hold exactly one client certificate, which OMi will use to authenticate the user.

Note It is not necessary that the client certificate contains the flag "Smart Card Logon (1.3.6.1.4.1.311.20.2.2)" in the "Enhanced Key Usage" field.

For details, see Configure Client Certificate or Smart Card Authentication.

-jp, -jksPassword <arg>

Password for accessing the Java keystore.

-l,-list

Lists the content pack definitions.

-o,-output <output_file>

Specifies the name of the file to which you want the command to write during the export operation.

-p,-port <port>

Sets the port number. The default port numbers are 80 for HTTP and 443 for HTTPS. Do not specify this option in conjunction with the -url option.

-password <password>

Requests the password of the user specified in the -username option, whose account is being used for authentication purposes.

-sc, -smartcard

Use certificate stored on smart card or security token for authentication. When OMi is configured to use CAC authentication, the CLI tools under <OMi_HOME>/opr/bin/ do no directly prompt users to enter the password for the smartcard connected to the system. Instead, users must specify that a smartcard authentication is to be run, using the option -sc or -smartcard. Users attempting to run a tool without the -smartcard option automatically receive an error message.

-server <gateway_server>

Sets the target OMi gateway server using either a hostname or an IP address. The specified server must be an OMi gateway server. Default is ''{0}''.

Note: Do not specify this option in conjunction with the -url option.

-skipCheck

Omits the content pack consistency check. The content pack consistency check verifies if dependent content that is not part of another content pack is either in the content pack itself or already imported.

Caution: This option should only be used when upgrading to a newer version of the Content Pack.

-snapshot

Exports a snapshot of all content that can be managed by Content Packs Manager.

-ssl

Sets the protocol to HTTPS. The default protocol is HTTP. Do not specify this option in conjunction with the -url option. If you do not use the -port option to specify a non-standard port, the command uses the standard port number reserved for HTTPS: 443.

-t,-test

Runs import in preview mode and display the results immediately. No changes are committed to the database.

-u, -url <URL>

Specifies the URL of the OMi gateway server to access. The default value is:

http://<Gateway Server DNS name>:<port>/opr-admin-server

Do not specify this option in conjunction with the -server option.

-username <login_name>

The name of the user, whose account is being used for authentication purposes.

-v,-verbose

Prints verbose output.

-version

Prints the version information of the command and exits.

-wc, -winCrypto

If OMi is configured for TLS mutual authentication, this option specifies to use the Windows certificate store for authentication. The certificate store must hold exactly one client certificate, which OMi will use to authenticate the user. This option is only available on Windows systems.

For details, see Configure Client Certificate or Smart Card Authentication.

Exit Status

Exit Status

Description

0

Successful completion

1

Failure of requested operation

300-399

HTTP Redirection (300-399)

400-499

HTTP Client Error (400-499)

500-599

HTTP Internal Server Error (500-599)

The exit status numbers (300-599) reflect a standard HTTP-status category (and number), for example: Redirection (300-399). For more information about a specific HTTP error status, for example: 307, which signifies a temporary HTTP re-direct, see the publicly available HTTP documentation.

Restrictions

The user running the ContentManager command-line interface must be an OMi user with permission to create content packs.

Non-admin users also need the following file permissions to operate this command-line tool:

File Windows Permissions Linux Permissions
<OMi_HOME>/conf/TopazInfra.ini read r
<OMi_HOME>/log/opr-clis.log full control rw

<OMi_HOME>/log/opr-pgctl.log

Note: This file is not available on gateway server systems.
full control rw
<OMi_HOME>/conf/encryption.properties read r
<OMi_HOME>/conf/seed.properties read r