53-1003243-01July 2014®Brocade Virtual ADXOpenScript API GuideSupporting Brocade Virtual ADX version 03.1.00
x Brocade Virtual ADX OpenScript API Guide53-1003243-01Command syntax conventionsNotes, cautions, and warningsThe following notices and statements may
88 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6OS_HTTP_RESPONSE::headers_as_stringReturns a string representation of all HTTP respons
Brocade Virtual ADX OpenScript API Guide 8953-1003243-01Chapter7Server Load Balancing API ReferenceIn this chapterThis chapter contains the following
90 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7Input ParametersThe following table contains the input values.Return ValuesThe followi
Brocade Virtual ADX OpenScript API Guide 9153-1003243-01Methods7Return ValuesThe following table contains the return values.ExampleOS_SLB:: servers($g
92 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7ExampleOS_SLB::is_server_up("server-name"=>$name, "server-id"=&
Brocade Virtual ADX OpenScript API Guide 9353-1003243-01Methods7ExampleOS_SLB:: get_server_current_connections($name)Returns the number of current con
94 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7OS_SLB:: get_server_port_current_connections($name, $port)Returns the current connec
Brocade Virtual ADX OpenScript API Guide 9553-1003243-01Methods7UsageCan be used to perform SSL specific operations.Input ParametersNone.Return Values
96 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7Return ValuesThe following table contains the return values.ExampleOS_SLB:: persist($m
Brocade Virtual ADX OpenScript API Guide 9753-1003243-01Methods7Return ValuesNoneExampleOS_SLB:: passive_persist($method, $string)Causes the system to
Brocade Virtual ADX OpenScript API Guide xi53-1003243-01Brocade resourcesTo get up-to-the-minute information, go to http://my.brocade.com to register
98 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7OS_SLB:: persist_lookup($method, $string)Returns the server name stored in the persist
Brocade Virtual ADX OpenScript API Guide 9953-1003243-01Methods7ExampleOS_SLB:: reply($data)Causes the system send an error response to a client inste
100 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7Input ParametersThe following table contains the input values.Return ValuesNoneExampl
Brocade Virtual ADX OpenScript API Guide 10153-1003243-01Methods7ExampleOS _SLB:: log($log_string)DescriptionCauses the system to send the log string
102 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7OS _SLB:: dropDescriptionCauses the system to drop a UDP packet.ContextThis function
Brocade Virtual ADX OpenScript API Guide 10353-1003243-01Methods7Input ParametersThe following table contains the input values.NOTEIf no input is incl
104 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7Return ValuesNone.ExampleOS _SLB:: send_to_serverDescriptionCauses the system send th
Brocade Virtual ADX OpenScript API Guide 10553-1003243-01Methods7ExampleOS _SLB:: is_group_up($group-id)DescriptionReturns the state of the certain gr
106 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods7ExampleNOTEThis API returns the status of the real server ports, which belong to grou
Brocade Virtual ADX OpenScript API Guide 10753-1003243-01Chapter8Connection API ReferenceIn this chapterThis chapter contains the following sections:•
xii Brocade Virtual ADX OpenScript API Guide53-1003243-01Document feedback• Brocade Supplemental Support augments your existing OEM support contract,
108 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods8Return ValuesThe following table contains the return values.ExampleTABLE 129 Return V
Brocade Virtual ADX OpenScript API Guide 10953-1003243-01Chapter9Content Inspection API ReferenceIn this chapterThis chapter contains the following se
110 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9• Content Inspection API operations are transactional:- The matching and replacing of
Brocade Virtual ADX OpenScript API Guide 11153-1003243-01Methods9Return valuesNoneExampleOS_PAYLOAD_INSPECT::match(regexp1, [regexp2 …])Specifies the
112 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9Input parametersThe following table contains the input values.Return valuesNoneExampl
Brocade Virtual ADX OpenScript API Guide 11353-1003243-01Methods9OS_PAYLOAD_INSPECT::matched_replace(mstr1, rstr1, [mstr2, rstr2, …])Replaces match st
114 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9Return valuesNoneExamplesIn the following example, when the response content type is
Brocade Virtual ADX OpenScript API Guide 11553-1003243-01Methods9In the following example, when response content type is text, the script replaces all
116 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9ExampleIn the following example, the script changes the maximum match size during pay
Brocade Virtual ADX OpenScript API Guide 11753-1003243-01Methods9OS_PAYLOAD_INSPECT::matched_str ()Returns the substring that was matched in scanning
Brocade Virtual ADX OpenScript API Guide 153-1003243-01Chapter1About OpenScriptOverviewBrocade Virtual ADX Perl Extensions allow scripts to access loa
118 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9In the following example, the script searches for the ‘correct’ and ‘login’ strings i
Brocade Virtual ADX OpenScript API Guide 11953-1003243-01Methods9ExampleIn the following example, the script scans the payload to read the member info
120 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods9
2 Brocade Virtual ADX OpenScript API Guide53-1003243-01Overview1Table 1 provides a list of application and protocol events provided for OpenScript. TA
Brocade Virtual ADX OpenScript API Guide 353-1003243-01Overview1Error handlingAll OpenScript API methods return an empty list in the list context, an
4 Brocade Virtual ADX OpenScript API Guide53-1003243-01Reducing memory usage1Reducing memory usageOpenScript will automatically free up memory when th
Brocade Virtual ADX OpenScript API Guide 553-1003243-01Chapter2IP API referenceIn this chapterThis chapter contains the following sections:•Overview.
6 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2Return ValuesThe following table contains the return values.ExampleOS_IP::dstDescriptio
Brocade Virtual ADX OpenScript API Guide 753-1003243-01Methods2ExampleOS_IP::protocolDescriptionReturns the protocol type of the current packet.Contex
Copyright © 2014 Brocade Communications Systems, Inc. All Rights Reserved.ADX, AnyIO, Brocade, Brocade Assurance, the B-wing symbol, DCX, Fabric OS, I
8 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2ExampleOS_IP::flagsDescriptionReturns the flags set in the current packet.ContextCalled
Brocade Virtual ADX OpenScript API Guide 953-1003243-01Methods2ExampleOS_IP::tosDescriptionReturns the type of service flag set in the current packet.
10 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2ExampleOS_IP::optionsDescriptionReturns options in the current packet if present other
Brocade Virtual ADX OpenScript API Guide 1153-1003243-01Methods2ExampleOS_IP::getHeaderLengthDescriptionReturns the IP header length in bytes. Header
12 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2ExampleOS_IP::getPayloadLengthDescriptionReturns payload length of current packet in b
Brocade Virtual ADX OpenScript API Guide 1353-1003243-01Methods2ExampleOS_IP::getOptionsLengthDescriptionReturns the length of options in bytes if pre
14 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2ExampleOS_IP::rawDescriptionReturns the data within an IP packet including the IP head
Brocade Virtual ADX OpenScript API Guide 1553-1003243-01Methods2Exampleuse OS_IP;use OS_HTTP_REQUEST;sub HTTP_REQUEST{$raw_data = OS_IP::raw;if(define
16 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods2
Brocade Virtual ADX OpenScript API Guide 1753-1003243-01Chapter3TCP API referenceIn this chapterThis chapter contains the following sections:•Overview
Brocade Virtual ADX OpenScript API Guide iii53-1003243-01ContentsPrefaceDocument conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3Return ValuesThe following table contains the return values.ExampleOS_TCP::dstDescript
Brocade Virtual ADX OpenScript API Guide 1953-1003243-01Methods3ExampleOS_TCP::flagsDescriptionReturns the TCP flag set in packet.ContextCalled in con
20 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3OS_TCP::winDescriptionReturns the window size (in bytes) of the current TCP packet. Re
Brocade Virtual ADX OpenScript API Guide 2153-1003243-01Methods3ContextCalled in context of TCP and HTTP. UsageCan be used to perform load-balancing b
22 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3Return ValuesThe following table contains the return values.ExampleOS_TCP::optionsDesc
Brocade Virtual ADX OpenScript API Guide 2353-1003243-01Methods3ExampleOS_TCP::getHeaderLengthDescriptionReturns TCP header length in bytes. Header le
24 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3ExampleOS_TCP::getPayloadLengthDescriptionReturns payload length of current packet. Pa
Brocade Virtual ADX OpenScript API Guide 2553-1003243-01Methods3ExampleOS_TCP::getOptionsLengthDescriptionReturns length of options if present, otherw
26 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3ExampleOS_TCP::collectDescriptionReturns the TCP data within a TCP packet.ContextCalle
Brocade Virtual ADX OpenScript API Guide 2753-1003243-01Methods3ExampleOS_TCP::payloadDescriptionReturns a packet's TCP payload. Before calling t
iv Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3ConstraintA “TCP_SERVER_DATA/ TCP_CLIENT_DATA” buffered payload will be forwarded to t
Brocade Virtual ADX OpenScript API Guide 2953-1003243-01Methods3Performance ImpactThis function will have a significant impact on system performance.E
30 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods3
Brocade Virtual ADX OpenScript API Guide 3153-1003243-01Chapter4UDP API referenceIn this chapterThis chapter contains the following sections:•Overview
32 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods4Return ValuesThe following table contains the return values.ExampleOS_UDP::dstReturns
Brocade Virtual ADX OpenScript API Guide 3353-1003243-01Methods4ExampleOS_UDP::getLengthReturns UDP header and payload length in bytes. ContextCalled
34 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods4ContextCalled in UDP context only. UsageCan be used to perform load-balancing based on
Brocade Virtual ADX OpenScript API Guide 3553-1003243-01Methods4Return ValuesThe following table contains the return values.ExampleOS_UDP::payload ($d
36 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods4ExampleOS_UDP::rawDescriptionReturns the data within a UDP packet including the UDP he
Brocade Virtual ADX OpenScript API Guide 3753-1003243-01Chapter5HTTP REQUEST API referenceIn this chapterThis chapter contains the following sections:
Brocade Virtual ADX OpenScript API Guide v53-1003243-01Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5UsageCan be used to perform load-balancing based on the method.Input ParametersNone.Re
Brocade Virtual ADX OpenScript API Guide 3953-1003243-01Methods5Input ParametersThe following table contains the input values.Return ValuesNoneExample
40 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5ExampleOS_HTTP_REQUEST::url($val)Sets the value of the URL to the value specified in $
Brocade Virtual ADX OpenScript API Guide 4153-1003243-01Methods5OS_HTTP_REQUEST::pathReturns URL path specified in HTTP request header if it exists, o
42 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5Input ParametersThe following table contains the input values.Return ValuesNoneExample
Brocade Virtual ADX OpenScript API Guide 4353-1003243-01Methods5ExampleOS_HTTP_REQUEST::query($val)Sets the value of the URL query to the value specif
44 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5OS_HTTP_REQUEST::url_extensionReturns URL extension specified in the HTTP request head
Brocade Virtual ADX OpenScript API Guide 4553-1003243-01Methods5UsageCan be used to perform load-balancing based on the version.Input ParametersNone.R
46 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5Return ValuesNoneExampleOS_HTTP_REQUEST::header($name)Return the HTTP header value of
Brocade Virtual ADX OpenScript API Guide 4753-1003243-01Methods5ExampleOS_HTTP_REQUEST::header($name, $value)Set the HTTP header value to the value sp
vi Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5OS_HTTP_REQUEST::headers($name)Gets all the HTTP headers with the same name as an arra
Brocade Virtual ADX OpenScript API Guide 4953-1003243-01Methods5Return ValuesThe following table contains the return values.ExampleOS_HTTP_REQUEST::ho
50 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5OS_HTTP_REQUEST::collectStarts collecting an HTTP request payload. This is useful only
Brocade Virtual ADX OpenScript API Guide 5153-1003243-01Methods5OS_HTTP_REQUEST::contentReturns the request content specified in the HTTP request if i
52 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5OS_HTTP_REQUEST::content($value)Sets the request content to the value specified in $va
Brocade Virtual ADX OpenScript API Guide 5353-1003243-01Methods5UsageCan be used to insert a header.Input ParametersThe following table contains the i
54 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5Input ParametersThe following table contains the input values.Return ValuesNoneExample
Brocade Virtual ADX OpenScript API Guide 5553-1003243-01Methods5ExampleOS_HTTP_REQUEST::content_typeReturns request content type if the content-type h
56 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5UsageCan be used to perform load-balancing based on the content length.Input Parameter
Brocade Virtual ADX OpenScript API Guide 5753-1003243-01Methods5Return ValuesThe following table contains the return values.ExampleOS_HTTP_REQUEST::co
Brocade Virtual ADX OpenScript API Guide vii53-1003243-01Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5OS_HTTP_REQUEST::cookie_countReturns the number of cookies present in the HTTP request
Brocade Virtual ADX OpenScript API Guide 5953-1003243-01Methods5Input ParametersThe following table contains the input values.Return ValuesNoneExample
60 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5Input ParametersThe following table contains the input values.Return ValuesNoneExample
Brocade Virtual ADX OpenScript API Guide 6153-1003243-01Methods5Exampleuse OS_HTTP_REQUEST;sub HTTP_REQUEST{my $all_headers = OS_HTTP_REQUEST::headers
62 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods5
Brocade Virtual ADX OpenScript API Guide 6353-1003243-01Chapter6HTTP RESPONSE API referenceIn this chapterThis chapter contains the following sections
64 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6UsageCan be used to retrieve the response code.Input ParametersNone.Return ValuesThe f
Brocade Virtual ADX OpenScript API Guide 6553-1003243-01Methods6ExampleOS_HTTP_RESPONSE::version Returns the response version specified in the HTTP re
66 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6UsageCan be used to set the version.Input ParametersThe following table contains the i
Brocade Virtual ADX OpenScript API Guide 6753-1003243-01Methods6Return ValuesThe following table contains the return values.ExampleOS_HTTP_RESPONSE::h
viii Brocade Virtual ADX OpenScript API Guide53-1003243-01
68 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6ExampleOS_HTTP_RESPONSE::headers($name)Gets the HTTP headers with the same name as a a
Brocade Virtual ADX OpenScript API Guide 6953-1003243-01Methods6ContextThis function can be called from an HTTP_RESPONSE_DATA event.UsageThis function
70 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6UsageA server load balancing action cannot be taken based on the content collected. In
Brocade Virtual ADX OpenScript API Guide 7153-1003243-01Methods6Return ValuesNonePerformance impactUsing this function will have a significant impact
72 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6ExampleOS_HTTP_RESPONSE::remove_header ($name) Removes the HTTP header specified in $n
Brocade Virtual ADX OpenScript API Guide 7353-1003243-01Methods6NOTEThis API will remove all headers with a value specified by the $name variable (cas
74 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6Return ValuesThe following table contains the return values.ExampleOS_HTTP_RESPONSE::c
Brocade Virtual ADX OpenScript API Guide 7553-1003243-01Methods6ExampleOS_HTTP_RESPONSE::cookie ($name)Returns the cookie value for the cookies specif
76 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6ContextThis function called in http request context will have no effect.UsageCan be us
Brocade Virtual ADX OpenScript API Guide 7753-1003243-01Methods6Input ParametersThe following table contains the input values.Return ValuesThe followi
Brocade Virtual ADX OpenScript API Guide ix53-1003243-01PrefaceDocument conventionsThis section describes text formatting conventions and important no
78 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6ExampleOS_HTTP_RESPONSE::cookie_path ($name) Gets the cookie path specified by $name
Brocade Virtual ADX OpenScript API Guide 7953-1003243-01Methods6ContextThis function called in http request context will have no effect.UsageCan be us
80 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6Return ValuesThe following table contains the output values. ExampleOS_HTTP_RESPONSE::
Brocade Virtual ADX OpenScript API Guide 8153-1003243-01Methods6ExampleOS_HTTP_RESPONSE::cookie_port ($name) Gets the cookie ports for the cookie sp
82 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6OS_HTTP_RESPONSE::cookie_port ($name, $value) Sets the ports of the cookie specified
Brocade Virtual ADX OpenScript API Guide 8353-1003243-01Methods6Input ParametersThe following table contains the input values.Return ValuesThe followi
84 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6Return ValuesNone.ExampleOS_HTTP_RESPONSE::cookie_expiration($name) Gets the expirat
Brocade Virtual ADX OpenScript API Guide 8553-1003243-01Methods6OS_HTTP_RESPONSE::cookie_expiration($name, $value) Sets the expiration date and time
86 Brocade Virtual ADX OpenScript API Guide53-1003243-01Methods6Input ParametersThe following table contains the input values.Return ValuesThe followi
Brocade Virtual ADX OpenScript API Guide 8753-1003243-01Methods6Return ValuesNone.Example OS_HTTP_RESPONSE::cookie_countReturns the number of cookies
Comentários a estes Manuais