Sun Update Connection - Enterprise 1.0 User's Guide

Host and Group Commands

The following commands allow you to view and manage hosts and groups of hosts.

This section includes the following:

Add Host (-ah) Command

The add-host command adds predefined host data to the system before agent installation. The agent on the host adds the host automatically. If there is already a host in the system with the given host name, the command results in an error.

Parameter

  • -h hostname Specify the name of the host.

  • -D distribution Specify the distribution to use. If not specified, the command operates on all distributions.

Syntax

uce_cli -ah -h hostname -D distribution -u username -p password

Example

uce_cli -ah -h wserver03 -D RH9_IA32 -u admin -p 123

To get valid values for the -D parameter, use the -ld command. The value of -h must not already be in the output of the -lah command.

Delete Host (-dh) Command

The delete-host command removes a host from the management of the system. This command is effective only if the agent has been stopped or uninstalled.

Parameter

-h hostname Specify the name of the host.

Syntax

uce_cli -dh -h hostname -u username -p password

Example

uce_cli -dh -h wserver03 -u admin -p 123

To get valid values for the -h parameter, use the -lah command.

Rename Host (-rh) Command

The rename-host command renames a host, from an existing name to a new name. The name of the host is not the DNS name (Unique String) of the machine, but the Sun Update Connection – Enterprise name of the host. You can change this name at any time without affecting the machine or its configurations.

Parameter

  • -sH hostname Specify the source host name of an existing host.

  • -tH hostname Specify the name of a target host.

Syntax

uce_cli -rh -sH hostname -tH hostname -u username -p password

Example

uce_cli -rg -sH lnx013 -tH mailserver_2 -u admin -p 123

To get valid values for the -sH parameter, use the -lah command.

A valid value for the -tH parameter is a new, unique host name. This name must not appear in the output of the -lah command.

Add Group (-ag) Command

The add-group command creates a new group of hosts.

Parameter

  • -g groupname Specify the name of a group.

  • -pG groupname Optionally specify the name of an existing parent group under which to create the group.

Syntax

uce_cli -ag -g "groupname" [ -pG "groupname" ] -u username -p password

Example

uce_cli -ag -g ApacheServers -pG WebServers -u admin -p 123

To get valid values for the -pG parameter, use the -lg command.

Add Host to Group (-ahg) Command

The add-host-group command assigns a managed host to a group.

Parameter

  • -h hostname Specify the name of a host.

  • -g groupname Specify the name of a group.

Syntax

uce_cli -ahg -h hostname -g "groupname" -u username -p password

Example

uce_cli -ahg -h wsrvr03 -g WebServers -u admin -p 123

To get valid values for the -h parameter, use the -lah command.

Valid values and results for the -g parameter:

Delete Group (-dg) Command

The delete-group command deletes a group and its sub-groups from the system. It does not unregister the managed hosts. It cannot be used on default groups.

Parameter

-g groupname Specify the name of the group.

Syntax

uce_cli -dg -g "groupname" -u username -p password

Example

uce_cli -dg -g WebServers -u admin -p 123

To get valid values for the -g parameter, use the -lg command.

Rename Group (-rg) Command

The rename-group command renames a group, from an existing name to a new name.

Parameter

  • -sG groupname Specify the source group name of an existing group.

  • -tG groupname Specify the name of a target group. This name must be a new group.

Syntax

uce_cli -rg -sG "groupname" -tG "groupname" -u username -p password

Example

uce_cli -rg -sG WebServers -tG webserver -u admin -p 123

To get valid values for the -sG parameter, use the -lg command.

A valid value for the -tG parameter is a new, unique group name. It must not appear in the output of the -lg command.