PreviousNext

Common Operations

This topic gives a description of operations that are common to more than one object. Some operations presented here are implemented in all objects, some in only a few, and some only for specific types of objects such as containers (for instance, CDS directories).

add
Adds an object to a container. It is implemented for all objects that represent containers. Returns an empty string on success. The argument is a list of names of containers. The required -member option is used to specify the name of the member to be added to the containers. Its value is a list of members to be added. If lists are specified for both the -member option and as the argument, then each member name is added to each container. For example it is used to add a member to an RPC group, and is used to add an element to an RPC profile.

catalog
Returns the names of all instances of an object. It usually takes no argument. In some cases, though, an argument specifying a scope, such as a cellname, is optional. For example, the principal catalog command returns a list of all principals in the registry. Only implemented by those objects for which this is possible. By default, full names are returned. Some objects support a -simplename option that returns names in a shorter form (either relative or not fully qualified). The order of the returned list depends on the object.

create
Creates a new instance of an object. Takes one argument which a list of names of instances to be created. Returns an empty string on success. Returns an error if the object already exists. For some objects this command takes an -attribute option or a set of attribute options to create attributes on the new object.

delete
Destroys an instance of the object. Takes one argument that is a list of names of instances to be deleted. Returns an empty string on success. If the object does not exist, an error is returned.

help
Returns help information on the object. Takes an argument that may be an operation supported by the object, or the -verbose option to return more information.

list
Returns a list of the names of all the members of a container. This operation returns names of members, never any other (for example, attribute) information about the members. It is implemented on all objects that represent containers. The argument is a list of names of containers to return the children of. The order of the returned list depends on the object. If more than one container name is given as an argument, all the member names are returned in one list.

modify
This operation modifies attributes, policies, counters, or any other information in an object. Therefore, all attributes, policies, counters, and so on, in any one object must have unique names. It will not be available to all objects. Returns an empty string on success. The argument is a list of names of objects to modify.

The specific modification is described by one or more -add, -remove, or -change options. If more than one option is used, then the whole modify operation is treated atomically in that either all of it will work, or none of it will. The order of the options is not significant. Each option can only be used once per command invocation. If more then one attribute is to be added, then the value of that option should be an attribute list.

-add
Adds an attribute to an object or to add values to an existing attribute. The value of this option is an attribute list.

-remove
Removes an entire attribute or some values from an object. The value of this option is an attribute list.

-change
Changes one attribute value to another. The value of this option is an attribute list.

operations
Returns a list of the operations supported by the object. It takes no arguments, and always returns a Tcl list suitable for use in a foreach statement. The order of the elements is alphabetical, with the exception that help and operations are listed last. If the user wants them sorted they should use:

lsort [object operations]

remove
Removes an object from a container. It is implemented for all objects that represent containers. The argument is a list of names of containers. The remove command requires one option, -member, which is used to specify the name of the member to be removed from the container. The value is a list of names of members of the containers. If the value of this option and the argument to the command are both lists, then each listed member is removed from each specified container. If the members do not exist an error is returned.

rename
Changes the name of a specified object. The argument is a single name of an object to be renamed, that is, it cannot be a list. Takes a required -to option with a value of the new name. The value may not be a list. Returns an empty string on success.

show
Returns information about an object instance. Objects can have various types of information such as attributes, counters, policies, and so on. The show command is used to return any of this information. Options are passed to the command to specify what information is to be returned. Most of the options used for this purpose are in the plural form such as -all, -attributes, -counters, and -members.

Unlike the list command which returns information about the members of a container, the show command only looks at the named object instance. If it is a container, it does not return information about the members, only the container itself.

This operation takes one argument which is a list of names of instances to be shown.

synchronize
Tells the instance to synchronize with any replicas of itself. In CDS terminology, this operation performs a skulk on a directory; in DTS, it causes a server to synchronize. This operation is implemented for all objects that support replication. The argument is a list of instance names to synchronize. If more than one instance name is given, each instance synchronizes, with all its replicas. Pairwise synchronization is not supported. This operation returns an empty string on success.