DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing a SCOadmin manager

Object options

The availability of options also depends on the class definition. The filter option can sift an object list based on the values of attributes (or on the object's class), so its use depends on what attributes an object has. The scope operator can only be used for objects which can contain other objects. A containment relationship is defined between two classes when objects of one class can contain objects of another class. An example of this is a hard disk object containing partitions.

When scoping and filtering are used together, the scope operator is applied, then the filter.

Object call options

Option Description
-filter Allows an object list to be filtered according to specific criteria
-scope level Replaces the object list with the list of objects contained by the original object list. Only one level is currently supported, 1 or FirstLevelOnly.
-callback Causes the object call to return immediately before the operation has completed. The framework will call the specified function with the results of the operation.
-access Defines access data (OSA-defined)
-sync Defines synchronization type (OSA-defined)
Below is an example of scoping, in which an ObjectGet is performed on all the objects contained by the all object in the {sco devices} class. The foreach statement is used to print each object returned by ObjectGet on a separate line for legibility:

   osavtcl> foreach obj [ObjectGet -scope 1 -filter {type eq disk} \
   	{sco devices} all alias} {echo $obj}
Which outputs:
   {get {sco device} disk1 {{alias disk1}} {} {} {}}
The {sco devices} class is a special class which defines a pseudo-object that doesn't correspond to any real entity. This object's sole purpose is to contain all the objects of type {sco devices} on the system. This sort of class is useful for finding all objects of some other class.

The SCOadmin services library contains a number of helper routines that act as front ends to object calls in order to perform commonly-used tasks:


Next topic: Localizing your manager
Previous topic: Object definitions and attributes

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004