Obtain configuration IDs

 


To return all the configuration IDs that match the representation of a containment and assign them to a variable, invoke AdminConfig with the getid option. For example:

set var [$AdminConfig getid /type:name/]

One can specify multiple containment path options:

/type:name/type:name/type:name/

If you just specify the type without the name, include the colon:

/type:/

The containment path must be a path containing the correct hierarchical order. For example, if you specify...

/Server:servername/Node:nodename/
...as the containment path, you will not receive a valid configuration ID because Node is parent of Server and should come before Server in the hierarchy.

To look for all the server configuration IDs residing in nodename:

set nodeServers [$AdminConfig getid /Node:nodename/Server:/]

To look for servername configuration ID residing in nodename:

set servername [$AdminConfig getid /Node:nodename/Server:servername/]

To look for all the server configuration IDs:

set servers [$AdminConfig getid /Server:/]

You can also obtain the ID of the configuration object with the list command:

set var [$AdminConfig list type]
or

set var [$AdminConfig list type scopeId]

This command returns a list of configuration object IDs of a given type. If you specify the scopeId, the list of objects returned is within the scope specified. The list returned is assigned to a variable.

To look for all the server configuration IDs:

set servers [$AdminConfig list Server]

To look for all the server configuration IDs in nodename:

set scopeid [$AdminConfig getid /Node:nodename/]
set nodeServers [$AdminConfig list Server $scopeid]

If there are more than one configuration IDs returned from the getid or list command, the IDs are returned in a list syntax. One way to retrieve a single element from the list is to use the lindex command. The following example retrieves the first configuration ID from the server object list:

set allServers [$AdminConfig getid /Server:/]
set aServer [lindex $allServer 0]