DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Object(TCL_ADM)


Object: ObjectCreate, ObjectDelete, ObjectAction, ObjectGet, ObjectReplaceWithDefault, ObjectReplace, ObjectAdd, ObjectRemove -- perform operations on SCOadmin objects

Syntax

ObjectCreate [option ...] class objects [referenceObject]
ObjectDelete [option ...] class objects
ObjectAction [option ...] class objects actionType actionInfo
ObjectGet [option ...] class objects [attributeList]
ObjectReplaceWithDefault [option ...] class objects [attributeList]
ObjectReplace [option ...] class objects attributeValueList
ObjectAdd [option ...] class objects attributeValueList
ObjectRemove [option ...] class objects attributeValueList

Description

These calls perform operations on SCOadmin objects. All object calls take a class and a list of objects within that class. The class of an object determines what operations can be performed on it and what its behavior is with respect to those operations.

ObjectCreate
create an object with the given class and name. If a reference object is specified, base the attributes of the new object on those of the reference object; otherwise, default values will be used.

ObjectDelete
delete an object with the given class and name.

ObjectAction
perform a class-specific action on an object with the given class and name. The action will use the additional action information if needed.

ObjectGet
get attributes of the object with the given class and name. If an attribute list is passed, get only the listed attributes; otherwise, get all the attributes of the object.

ObjectReplaceWithDefault
assign default values to attributes of the object with the given class and name. If an attribute list is passed, replace only the values of the listed attributes; otherwise, replace the values of all the attributes of the object with defaults.

ObjectReplace
replace specified values of the object with the given class and name. For each attribute-value pair in the attribute-value list, replace the existing value(s) of the given attribute with the given value(s).

ObjectAdd
add values to attributes of the object with the given class and name. For each attribute-value pair in the attribute-value list, add the given value(s) to the given attribute.

ObjectRemove
remove values from attributes of the object with the given class and name. For each attribute-value pair in the attribute-value list, remove the given value(s) from the given attribute.

Arguments


class
name of the class on which the operation is performed. The SCOadmin library uses the class name to identify which OSA (Object Service Agent) to run.

objects
list of objects to be operated on. This list may be modified if the -filter or -scope options are used.

attributeList
optional variable that names on which attributes the operation runs. If it is not provided on the command line, the list of all attributes that are valid for the operation on the class are used instead.

attributeValueList
list of attribute/value pairs that are provided to the operation.

referenceObject
used with the create operation, the referenceObject is used as a basis for the new object in terms of supplying default values, and so on. referenceObject must already exist as an object instance. If it is not provided on the command line, the create operation uses default values.

actionType
tells an action operation what action to perform.

actionInfo
tells an action operation any additional information it might require

Options

The following optional arguments can be placed before the class argument in any order. These arguments must be specifically supported by the class definition in order to be valid.

-access access specifier
specifies the access control to be implemented on this operation

-filter filter expression
describes the filter that is used on the list of object instances. The filter can consist of an algebraic expression composed of the following expressions:
expression 	:= { expression or expression }
		:= { expression and expression }
		:= { not expression }
		:= { present attribute }
		:= { attribute filterOperation value}
filterOperation := eq
		:= le
		:= ge
		:= subset
		:= superset
		:= intersect
The filter operations used in a filter expression must be valid for the attribute on which they are used. This is determined by the class definition.

-sync <type>
Specifies to the SCOadmin OSA named by the class which type of syn- chronization to implement in performing the operation.

-callback \<userCB>
This allows for a modeless implementation of a user-SCOadmin connection. userCB is the name of a callback function to be sent the results of the operation when they have completed.

-scope 1
If the scope option is used, SCOadmin determines which objects are contained by each object in the given object list. This list of contained objects, rather than the original list, is then passed through any specified filters (see above) and subjected to the given object operation.

Return values

The object list passed to the object operation has scoping and then filtering applied to it if specified. The resulting object list has the specified operation performed on it. A list of responses, called BMIP responses, one for each object in the final object list, is returned. Each response has the following format:

{operation {class} name {attributeValueList} {actionType} {actionInfo} {errors}}

The elements of the response are as follows:


operation
operation performed on the object.

class
class of the object on which the operation was performed.

name
name of the object on which the operation was performed.

attributeValueList
list of attribute-value pairs relating to the operation performed.

actionType
type of action performed (only used in ObjectAction calls).

actionInfo
information for the action performed (only used in ObjectAction calls).

errors
error stack returned by the operation, if any.
The Bmip(TCL_ADM) manual page describes a set of helper routines to extract each of these fields.

Examples

ObjectCreate {sco user} johnp {{comment {John Q. Public}}}

ObjectGet {sco user} johnp {loginGroup}

ObjectGet -filter {{uid le 1000} and {not {shell eq ksh}}} {sco user} {fredp johnp lisap walterp} {groups}

ObjectAdd {sco user} johnp {{groups {104 203 165}}}

ObjectAction {sco user} johnp createHome {0755}

ObjectDelete {sco user} johnp

See also

Bmip(TCL_ADM).
16 September 2002
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003