RegList

RegList is a type level keylist attribute that can be used to store, or register, a list of certain resource level attributes. The agent calls the attr_changed entry point for a resource when the value of an attribute listed in RegList is modified. The RegList attribute is useful where a change in the values of important attributes require specific actions that can be executed from the attr_changed entry point.

By default, the attribute RegList is not included in a resource's type definition, but it can be added using either of the two methods shown below.

Assume the RegList attribute is added to the FileOnOff resource type definition and its value is defined as PathName. Thereafter, when the value of the PathName attribute for a FileOnOff resource is modified, the attr_changed entry point is called.

		static keylist RegList = { attribute1_name, attribute2_name, 
...}
 

For example, if the type definition is for the FileOnOff resource and the name of the attribute to register is PathName, the modified type definition would resemble:

<agent name="FileOnOff" platform="solaris/sparc" version="1.0">

.

.

.

<attributes class="static">

<attribute name="ArgList" type="str" dimension="vector">

<default>

<val>"PathName"</val>

</default>

<no_override>1</no_override>

. . .

</attribute>

<attribute name="RegList" type="str" dimension="keylist">

<default>

<val key="PathName"></val>

</default>

</attribute>

</attributes>

<attributes>

<attribute name="PathName" type="str" dimension="scalar">

<important>1</important>

<must_configure>1</must_configure>

<unique>1</unique>

<display_name>"PathName"</display_name>

</attribute>

</attributes>

</agent>

.

.

.

type FileOnOff (

str PathName

static keylist RegList = { PathName }

static str ArgList[] = { PathName }

)

.

.

platform_to_add_RegList_on

hatype -modify resource_type RegList attribute_name

-platform platform_name

For example:

# haattr -add -static FileOnOff RegList -keylist -platform

linux

# hatype -modify FileOnOff RegList PathName -platform linux

The RegList attribute cannot be overridden.