beautypg.com

Variables, Repeaters – Brocade Virtual ADX Graphical User Interface Guide (Supporting ADX v03.1.00) User Manual

Page 270

background image

258

Brocade Virtual ADX Graphical User Interface Guide

53-1003242-01

Overview

B

Variables

The XML Schema includes support for variables that allow late binding of configuration values. For
example, instead of having a hard-coded value for a virtual server IP address, you can enter a value
before the template is executed. Then, the variable mechanism injects the value into the template.
The use of these variables is limited to specific data elements, including server names and
addresses.

You can add an XML attribute variable to elements to denote that the value is a user input. For
example, you can specifically define the following virtual server:

some-vs-name

You can change it to the MYVS variable provided that the variable is declared and is set to a valid
value through either a default setting or user input.

Repeaters

Repeaters provide scalability and better use of late-bindings inputs found in variables. At selected
points in the XML schema, you can use a repeater element instead of or in addition to the expected
element. The Brocade Virtual ADX supports repeaters in the definition of real servers and the
binding of virtual server ports to real server ports.

For example, instead of a fixed-sized list of real servers with hard-coded values, you can use a
repeater to create a number of real servers, along with more flexibility in their configuration:

The RS_NAMES and RS_IPS variables contain lists of names and IP addresses, which are entered
for real servers one at a time in an iterative loop. The repeater count attribute determines how
many times to iterate by tallying the total number of items in RS_NAMES. These lists can be
provided by the user if needed. The number of real servers created depends on the size of the lists.

For example, the defined variables are given the following input values:

RS_NAMES = rs01, rs02, rs03

RS_IPS = 10.100.0.2, 10.100.0.22, 10.100.0.23

The previous XML snippet would result in the creation of the following real servers:

1. name = rs01, IP = 10.100.0.2

2. name = rs02, IP = 10.100.0.22

3. name = rs03, IP = 10.100.0.23