ltm rule command ADAPT context createΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



ADAPT::context_create
       Creates a new dynamic adaptation context.

SYNOPSIS
       ADAPT::context_create (ADAPT_SIDE)? NAME

DESCRIPTION
       Creates a new dynamic adaptation context in the ADAPT filter on the
       current or specified side of the virtual server connection for which
       the iRule is being executed. Maybe called mulitple times to dynamically
       create chains of adaptation contexts.

       Syntax:

       ADAPT::context_create 

	   * Creates a dynamic context on the current side.
	     This must be called from the request-adapt side, so has
	     the same effect as ADAPT::context_create request .

       ADAPT::context_create request 

	   * Creates a dynamic context on the request-adapt side
	     and inserts it last in the chain of contexts.

       ADAPT::context_create response 

	   * Creates a dynamic context on the response-adapt side
	     and inserts it first in the chain of contexts.

       ADAPT::context_create only be called from a request-adapt (client side)
       event. Response-adapt (server side) contexts must be created from a
       request-adapt (client side) event.

       The  string should uniquely identify a dynamic context within a
       virtual server and is useful for debug logging.

RETURN VALUE
       Returns the context handle.

VALID DURING
       HTTP_REQUEST, ADAPT_REQUEST_RESULT, HTTP_PROXY_REQUEST

EXAMPLES
	when HTTP_REQUEST {
	    # Create and configure dynamic contexts (on request side)
	    # for both request and response adaptation.
	    set req_ctx1 [ADAPT::context_create my_req_ctx1]
	    ADAPT::select $req_ctx1 ivs-icap-req1
	    set req_ctx2 [ADAPT::context_create my_req_ctx2]
	    ADAPT::select $req_ctx2 ivs-icap-req2
	    set rsp_ctx1 [ADAPT::context_create my_rsp_ctx1]
	    ADAPT::select $rsp_ctx1 response ivs-icap-rsp1
	    set rsp_ctx2 [ADAPT::context_create my_rsp_ctx2]
	}

	when HTTP_RESPONSE {
	    # Configure a response context from the current (response) side.
	    ADAPT::select $rsp_ctx2 ivs-icap-rsp2
	    ADAPT::timeout $rsp_ctx2 2000
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-12.0.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)