Compiling and binding scripts, Binding a script to a virtual server port, Updating an existing script – Brocade Virtual ADX OpenScript Programmer’s Guide (Supporting ADX v03.1.00) User Manual
Page 23

Brocade Virtual ADX OpenScript Programmer’s Guide
15
53-1003244-01
Compiling and binding scripts
3
Compiling and binding scripts
Once a script has been copied to the Brocade Virtual ADX, you must compile it before it can be run.
After the script is compiled, it is ready to run on the Brocade Virtual ADX but it must be bound to a
VIP that you want it to operate on. Unless a script is explicitly bound to a VIP it will not effect traffic
on the Brocade Virtual ADX.
This script compile can be done by itself, within the bind operation, or within the process of
updating an existing script. The following is the recommended sequence for binding and
maintaining a script:
1.
“Binding a script to a virtual server port”
– The script binding operation compiles the script
unconditionally and then enables it for packet processing on a specified server port or service.
If compilation errors occur, they are printed to the console or syslog and the bind operation is
aborted.
2.
– Once a script has been running, you can make changes to it and
replace it all instances of it in a running configuration. This process compiles the script
unconditionally and if the compile is successful, unbinds the old version from previously bound
virtual server ports and then binds the new script to the same ports.
Binding a script to a virtual server port
The script binding operation compiles the script unconditionally and then enables it for packet
processing on a specified server port or service.
The update is performed as shown.
VirtualADX(config)# server virtual-name-or-ip vs1 100.1.5.101
VirtualADX(config-vs-vs1)# port http script sample.pl script-profile sp1
Syntax: [no] port port-num-or-service script script-name [ script profile script-profile-name ]
The port-num-or-service variable species the virtual server port or service that you want to bind the
script to.
The script_name variable is the name of the script that you compile and bind.
The script profile parameter directs the Brocade Virtual ADX to apply the previously configured
script profile specified by the script-profile-name variable to the script being bound. If you do not
specify a script profile the default script profile values will be used. See
Updating an existing script
You can update all running instances of a script with the contents a newly updated script of the
same name. The script update command allows you to refresh all instances of a script bound to
active servers, after the script has been edited. Running this command compiles the script,
unbinds the current instance and then binds the new version of the script. If the compile fails, the
update is not completed. The update is performed as shown.
VirtualADX(config)# script update sample.pl
Syntax: script update script-name
The script_name variable is the name of the script that you want to update all running instances of.