Brocade Virtual ADX OpenScript Programmer’s Guide 11
53-1003244-01
Sample scripts
2
Power-user script example
The following example is the “power-user” version of the script. It is much more compact with less
extensive notation.
Example 2:
# Power User version
# Performs server selection based on URI in
# HTTP Request Header
use OS_HTTP_Request;
use OS_SLB;
use strict;
use Sub::StrictDecl;
sub HTTP_REQUEST
{
# local variable with default server group-id
$server = 2;
if (OS_HTTP_REQUEST::url =~ m/"index.html"/)
$server = "RS1";
# $server can hold integer or string values.
# Xtension backend does translation.
OS_SLB::forward($server);
}
Comentários a estes Manuais