ltm rule command ADAPT select
iRule(1) BIG-IP TMSH Manual iRule(1)
ADAPT::select
Sets or returns the internal virtual server (IVS) selection.
SYNOPSIS
ADAPT::select (ADAPT_CTX)? (ADAPT_SIDE)? (NAME)?
DESCRIPTION
The ADAPT::select command returns or selects the name of the internal
virtual server (IVS) associated with the ADAPT filter on the current or
specified side of the virtual server connection for which the iRule is
being executed.
Syntax
ADAPT::select []
* Gets the IVS name for the current side
ADAPT::select [] request
* Gets the IVS name for the request-adapt side
ADAPT::select [] response
* Gets the IVS name for the response-adapt side
ADAPT::select []
* Sets the IVS by name for the current side
ADAPT::select [] request
* Sets the IVS by name for the request-adapt side
ADAPT::select [] response
* Sets the IVS by name for the response-adapt side
The optional argument applies the command to a specific
context. Useful when there are dynamic contexts. If "request" or
"response" is specified, the context must be on the appropriate side
(client or server, respectively).
RETURN VALUE
Returns the current or new internal virtual server (IVS) name.
VALID DURING
HTTP_REQUEST, HTTP_RESPONSE, HTTP_PROXY_REQUEST, ADAPT_REQUEST_RESULT,
ADAPT_RESPONSE_RESULT
EXAMPLES
when HTTP_RESPONSE {
if { [HTTP::header "Content-Type"] contains "image" } {
ADAPT::select ivs-icap-image
ADAPT::preview_size 10000
ADAPT::enable yes
}
if { [HTTP::header "Content-Type"] contains "video" } {
ADAPT::select ivs-icap-video
ADAPT::preview_size 30000
ADAPT::enable yes
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)