Sample resource definition

In the VCS configuration file, main.cf, a specific resource of the FileOnOff resource type may resemble:


Snippet from sample main.cf on UNIX:

include types.cf

.

.

.

FileOnOff temp_file1 (

PathName = "/tmp/test"

)

The include statement at the beginning of the main.cf file names the types.cf file, which includes the FileOnOff resource type definition. The resource defined in the main.cf file specifies:

When the resource temp_file01 is brought online on a system by VCS, the FileOnOff agent creates a file "test" in the specified directory on that system.

How the FileOnOff agent uses configuration information

The information in the VCS configuration is passed by the engine to the FileOnOff agent when the agent starts up on a system. The information passed to the agent includes: the names of the resources of the type FileOnOff configured on the system, the corresponding resource attributes, and the values of the attributes for all of the resources of that type.

Thereafter, to bring the resource online, for example, can provide the agent with the name of the entry point (online) and the name of the resource (temp_file01). The agent then calls the entry point and provides the resource name and values for the attributes in the ArgList to the entry point. The entry point performs its tasks.