Sun Update Connection - Enterprise 1.0 User's Guide

ProcedureTo Create a Nested Group

  1. Do one of the following:

    • In the Hosts list, select an existing group. The new group will be a nested group of the selected group. Right-click the selected group and choose Add Group.

    • Do not select a group yet. You can choose the parent group when you create the new group. Click the Add Group button.

    The New Group window opens.

  2. Check the Parent Group field:

    • If you selected a group before opening the New Group window, notice that the name of the selected group appears in the Parent Group field.

    • If you want to assign the new group to a different parent group, including if you did not select a group beforehand, click the Group Select button.

    The Group Selection window opens.

  3. Select one group to be the parent of the new group and then click OK.

  4. Finish creating the new group as in the previous procedure.


Example 4–1 Creating a Group with the CLI

The Add Group command in the CLI can create a top-level group. It has an optional parameter to create a nested group. To add hosts to the created group, use the Add Host to Group command. See Add Group (-ag) Command and Add Host to Group (-ahg) Command.


#! /bin/bash

function login { 
   echo -n “Type your user name:” 
   read user 
   echo -n “Type your password:” 
   read password
} 

function groupBasics { 
   echo -n “Type a name for the new group:” 
   read newGroup 
   echo -n “Should the new group be nested? (y | n):” 
   read pGyes 
} 

function createGroupWParent { 
   echo “Existing groups are:” 
   uce_cli -lg -u “$user” -p “$password” 
   echo “Copy the name of the group to be the parent.” 
   echo -n “It cannot be a default group:” 
   read parentGroup 
   echo “Creating $newGroup under $parentGroup” 
   uce_cli -ag -g “$newGroup” -pG “$parentGroup” -u “$user” -p “$password” 
} 

function createGroupNoParent {
   echo “Creating group without parent” 
   uce_cli -ag -g “$newGroup” -u “$user” -p “$password” 
} 

function addHost { 
   echo “Add a host to $newGroup...” 
     echo “Hosts are:” 
   uce_cli -lah -u “$user” -p “$password” 
   echo -n “Copy the host name that you want to add:” 
   read hostname 
   uce_cli -ahg -h “$hostname” -g “$newGroup” -u “$user” -p “$password” 
} 

login 
groupBasics 
if [ “$pGyes” = “y” ]; then 
   createGroupWParent 
else 
   createGroupNoParent 
fi 
addHost