Sun Update Connection - Enterprise 1.0 User's Guide

Syntax

The command to initiate the CLI is uce_cli.


Note –

You can also initiate the CLI with the osc command, which still exists for backward compatibility purposes. This osc command might be removed in future releases.



uce_cli -command -parameter value [...] [-flag][...] -u username -p password

The following command searches for a component with apac in its name:


# uce_cli -fc -T "apac" -u myname -p mypass

Arguments

The uce_cli command has these two types of arguments:

You can specify the -verbose flag with any command to produce troubleshooting information as part of the command output.

Some commands have an optional parameter for the delimiter of output. The delimiter is the separator between items in output. By default, the delimiter is a line feed, so each item appears on a separate line. You can change the delimiter in commands that offer this option to any set of characters or whitespace that meets your requirements.

If you want each item to appear in one line with commas, specify -dlt ", " as the delimiter in the command.

Some commands have a parameter (usually -T or -pT) whose value is a component in the knowledge base. When providing the name of a component, in particular, of a Local component, include its knowledge base path, to ensure that the name is unique. For example, specify the -T parameter as follows:


-T "Local/Configuration files/yourCat/yourDec/yourFile"

User Names and Passwords

Every CLI command is accessed with an existing Sun Update Connection – Enterprise user name of a user with full permissions, or the admin user, and with its password. You may type these access details directly into the command with the -u and -p parameters.

If you do not provide the -u and -p parameters in the command, the CLI prompts for them:

# uce_cli -lg

command to list all groups 

Initializing ...

“Initializing” is output as notification. 

Username: admin

“Username” is prompted. 

Password:

“Password” is prompted. Input is hidden. 

Special Characters

If a parameter value has a space or a special character, close the value in straight quotation marks (" ").

The exclamation mark (!) is not a valid character even in quotes. To use it, you must protect it with a backward slash: \!.

Local components may have names with the forward slash (/). For example, you could create a category of Configuration files called "/etc", to show that these files have target installations in the /etc directory. In the CLI commands, when you use a component that has / in its name, protect it with a backslash (\), so that the CLI can identify it as part of a string rather than a path.

For example, say that you have a category named /etc, a file declaration named /etc/hosts, and a file version called /etc/hosts-5 in the Local components list.

The CLI requires that you refer to this hierarchy as the following:


ROOT/Local/Configuration files/\/etc/\/etc\/hosts/\/etc\/hosts-5