get_child_zones
Use the get_child_zones command to return a Tcl list of the child zones, computer roles, and computer zones for the currently selected zone stored in memory. The options to return child zones and computer roles are only applicable when you are working with hierarchical zones.
In classic zones, you can use this command to return a Tcl list of classic-computer zones under the currently selected classic zone. A classic-computer zone is a special zone type that contains a single computer to enable computer-level role assignments. The classic zone must have the corresponding computer object and that computer must be identified as a classic-computer zone to support computer-specific role assignments.
Because classic zones do not have child zones or computer roles, executing get_child_zones with the -crole or -tree option without the computer option returns an empty list.
Zone Type
Classic and hierarchical
Syntax
get_child_zones [-tree] [-crole] [-computer]
Abbreviation
gcz
Options
This command takes any of the following options:
| Option | Description |
|---|---|
| -tree | Returns a Tcl list of the current zone’s child zones. If the currently selected zone is a classic zone, this option is ignored. |
| -crole | Returns a Tcl list of the current zone’s hosted computer roles. If the currently selected zone is a classic zone, this option is ignored. |
| -computer | Returns a Tcl list of the current zone’s computer-specific zones. For classic zones, this option returns a list of classic-computer zones. |
If you don’t specify an option and the currently selected zone is a hierarchical zone, get_child_zones returns the complete list of child zones including computer roles and computerspecific “zones” that enable computer-specific overrides. If you don’t specify an option and the currently selected zone is a classic zone, get_child_zones returns the list of classic-computer zones.
Arguments
This command takes no arguments.
Return Value
This command returns a Tcl list of child zones, computer roles, or computer-specific zones depending on the options used.
Examples
get_child_zones
This example returns:
{CN=cz1,CN=Zones,CN=Acme,CN=Program Data,DC=eel,DC=nest}
{CN=cz2,CN=Zones,CN=Acme,CN=Program Data,DC=eel,DC=nest}
{CN=global,CN=Zones,CN=Acme,CN=ProgramData,DC=eel,DC=nest/oracleServers}
Related Commands
Before you use this command, you must have a currently selected zone stored in memory. The following commands enable you to view and select the zone to work with:
create_zonecreates a new zone in Active Directory.get_zonesreturns a Tcl list of all zones within a specified domain.select_zoneretrieves a zone from Active Directory and stores it in memory as the currently selected zone.
After you have a zone stored in memory, you can use the following commands to work with that zone:
delegate_zone_rightdelegates administrative rights to a specified user or group.delete_zonedeletes the selected zone from Active Directory and memory.get_zone_fieldreads a field value from the currently selected zone.get_zone_nss_varsreturns the NSS substitution variable for the selected zone.save_zonesaves the selected zone with its current settings to Active Directory.set_zone_fieldsets a field value in the currently selected zone.
get_dz_commands
Use the get_dz_commands command to check Active Directory and return a Tcl list of UNIX command objects defined within the currently selected zone. If executed in a script, this command does not output its list to stdout, and no output appears in the shell where the script is executed. Use the list_dz_commands command to output to stdout.
You can only use the get_dz_commands command if the currently selected zone is a classic4 or hierarchical zones. The command does not work in other types of zones.
Zone Type
Classic and hierarchical
Syntax
get_dz_commands
Abbreviation
gdzc
Options
This command takes no options.
Arguments
This command takes no arguments.
Return Value
This command returns a Tcl list of UNIX commands defined in the currently selected zone.
Examples
get_dz_commands
This example returns the list of commands: root_any
Related Commands
Before you use this command, you must have a currently selected zone stored in memory. The following commands enable you to view and select a UNIX command to work with:
list_dz_commandslists tostdoutthe UNIX commands in the current zone.new_dz_commandcreates a new UNIX command and stores it in memory.select_dz_commandretrieves a UNIX command from Active Directory and stores it in memory.
After you have a UNIX command stored in memory, you can use the following commands to work with that command:
delete_dz_commanddeletes the selected command from Active Directory and from memory.get_dzc_fieldreads a field value from the currently selected command.save_dz_commandsaves the selected command with its current settings to Active Directory.set_dzc_fieldsets a field value in the currently selected command.