About attributes

VCS has the following types of attributes, depending on the object the attribute applies to.

Resource type attributes 

 

Attributes that define the resource types in VCS. These can be further classified as: 

  • Type-independent—Attributes that all agents (or resource types) understand. Examples: RestartLimit and MonitorInterval; these can be set for any resource type.

    Typically, these attributes are set for all resources of a specific type. For example, if you set the MonitorInterval for the IP resource type, the same value applies to all resources of type IP. You can also override the values of these attributes.

  • Type-dependent—Attributes that apply to a particular resource type. These attributes appear in the type definition file (.cf) for the agent.

    Examples: The MountPath attribute applies only to the Mount resource type. The Address attribute applies only to the IP resource type.

    Attributes defined in the types file (types.platform. xml) apply to all resources of the resource type. When you configure resources, you can assign resource-specific values to these attributes, which appear in the main.cf file.

    For example, the PathName attribute for the FileOnOff resource type is type-dependent, and can take a resource-specific value when configured.

  • Static—These attributes apply to all resource types and can have a different value per resource type. You can override some static attributes and assign them resource-specific values. These attributes are prefixed with the term static and are not included in the resource's argument list.

 

Attribute data types

VCS supports the following data types for attributes.

String 

A string is a sequence of characters and is typically enclosed by double quotes. If the string contains double quotes, the quotes must be immediately preceded by a backslash. A backslash is represented in a string as \\. Quotes are not required if a string begins with a letter, and contains only letters, numbers, dashes (-), and underscores (_). For example, a string defining a network interface such as hme0 or eth0 does not require quotes as it contains only letters and numbers. However a string defining an IP address contains periods and requires quotes, such as: "192.168.100.1"  

 

Integer 

Signed integer constants are a sequence of digits from 0 to 9. They may be preceded by a dash, and are interpreted in base 10. Integers cannot exceed the value of a 32-bit signed integer: 21471183247. 

Boolean 

A boolean is an integer, the possible values of which are 0 (false) and 1 (true).  

Attribute dimensions

VCS attributes have the following dimensions.

Scalar 

A scalar has only one value.  

For example: 

When values are assigned to a scalar attribute in the main..cf configuration file, it resembles: 

MountPoint = "/Backup"

Vector 

A vector is an ordered list of values. Each value is indexed using a positive integer beginning with zero.  

Use a comma (,) or a semi-colon (;) to separate values.  

A set of brackets ([]) after the attribute name denotes that the dimension is a vector.  

For example: 

str BackupSys[]

When values are assigned to a vector attribute in the main.cf configuration file, the attribute definition might resemble:  

BackupSys[] = { sysA, sysB, sysC }

For example, an agent's ArgList is defined as: 

static str ArgList[] = {RVG, DiskGroup, Primary, SRL, Links}

Keylist 

 

 

 

A keylist is an unordered list of strings, and each string is unique within the list. Use a comma (,) or a semi-colon (;) to separate values. 

For example, to designate the list of systems on which a service group will be started with VCS (usually at system boot): 

AutoStartList = {SystemA; SystemB; SystemC}

For example: 

keylist BackupVols = {}

When values are assigned to a keylist attribute in the main.cf file, it might resemble:  

BackupVols = { vol1, vol2 }

Association 

An association is an unordered list of name-value pairs. Use a comma (,) or a semi-colon (;) to separate values. 

A set of braces ({}) after the attribute name denotes that an attribute is an association.  

For example, to designate the list of systems on which the service group is configured to run and the system's priorities: 

SystemList = {SystemA=1, SystemB=2, SystemC=3}

For example: 

int BackupSysList {}

When values are assigned to an association attribute in the main.cf file, it might resemble: 

BackupSysList{} = { sysa=1, sysb=2, sysc=3 }

Attribute scope across systems: global and local attributes

An attribute whose value is the same across all systems in the SystemList is global in scope. An attribute whose value applies on a per-system basis is local in scope.

The at operator (@) indicates the system to which a local value applies.

In the following example of the MultiNICA resource type, attributes applying locally are indicated by "@system" following the attribute name:

MultiNICA mnic (

Device@sysa = { le0 = "166.98.16.103", qfe3 =

"166.98.16.105" }

Device@sysb = { le0 = "166.98.16.104", qfe3 =

"166.98.16.106" }

NetMask = "255.255.255.0"

ArpDelay = 5

Options = "trailers"

RouteOptions@sysa = "default 166.98.16.103 0"

RouteOptions@sysb = "default 166.98.16.104 0"

)

In the preceding example, the value of the NetMask attribute is "255.255.255.0" on all systems, whereas the values of the Device attribute and the RouteOptions attribute are different on sysa and sysb.

Attribute life: temporary attributes

You can define temporary attributes in the types file. The values of temporary attributes remain in memory as long as the VCS engine (HAD) is running. Values of temporary attributes are not available when the engine is restarted. These attribute values are not stored in the main.cf file.

Temporary attributes cannot be converted to permanent, and vice-versa. When you save a configuration, VCS saves temporary attributes and their default values in the type definition file.

You can define and modify these attributes only while VCS is running.