Declaration Section

The Declaration section of a policy contains definitions of local variables and variables coming in through a client request. These definitions are used within the Selector and Provider sections. These variables are stored along with system-defined variables.

Variable declarations are separated by a semicolon. Multiple declarations for the same type can be combined in one line or wrapped to the next line: they are not line-sensitive. A sample Declaration section is shown below:

REQUIRED INT R1;
REQUIRED TIME R2;
REQUIRED BOOLEAN R3,R4;
REQUIRED NETADDRESS R5,R6;
OPTIONAL INT P1 := 10;
OPTIONAL BOOLEAN := FALSE;
LOCAL INT L1 :=10;
LOCAL INT L2;
LOCAL TIME L3;
LOCAL BOOLEAN L4 :=TRUE, L5 :=FALSE;
LOCAL NETADDRESS L6;

The required and optional declarations are specific to a particular traffic type. Policies that do not contain the required variables will not run. The optional declarations must have a value to provide a default if none is passed in. WAN Traffic Manager provides system symbols (predefined variables) for use with all traffic types.

Each declaration consists of three parts: scope, type, and a list of name/optional value pairs.

Valid scopes are REQUIRED, OPTIONAL, LOCAL, and SYSTEM.

Valid types are INT, BOOLEAN, TIME, or NETADDRESS. You cannot assign values to TIME and NETADDRESS types in the Declaration section. If these types do not already have a value, they receive their values in the Selector or Provider sections. Only single types are initialized in the Declaration section.

Values in a declaration must be constants rather than variables or expressions. Thus, the declaration 'LOCAL INT L2 := L3;' is not allowed. A value initializing a variable in the declaration section may be changed in the Selector and Provider sections of the policy.



Previous | Next