nerdexam
F5

101 · Question #67

Which statement is true concerning iRule context?

The correct answer is A. The iRule event declaration determines the context.. In F5 BIG-IP iRules, the event declaration such as 'when HTTP_REQUEST' implicitly sets the context, which determines which commands and variables are accessible within that iRule block.

Section 2: F5 Solutions and Technology

Question

Which statement is true concerning iRule context?

Options

  • AThe iRule event declaration determines the context.
  • Bthe context must be explicitly declared.
  • CThe rule command determines the context.
  • DThe results of the iRule's conditional statement determines the context.

How the community answered

(64 responses)
  • A
    88% (56)
  • B
    3% (2)
  • C
    8% (5)
  • D
    2% (1)

Why each option

In F5 BIG-IP iRules, the event declaration such as 'when HTTP_REQUEST' implicitly sets the context, which determines which commands and variables are accessible within that iRule block.

AThe iRule event declaration determines the context.Correct

The event declaration in an iRule - such as 'when HTTP_REQUEST' or 'when CLIENT_ACCEPTED' - defines the processing context and determines which commands, variables, and methods are available. For example, HTTP:: commands are only accessible within HTTP events, while TCP:: commands are available in connection-level events. The context is automatically established by the event trigger, not by any separate declaration or runtime conditional.

Bthe context must be explicitly declared.

Context does not require explicit declaration; it is automatically and implicitly established the moment the specified event fires and the corresponding iRule block begins executing.

CThe rule command determines the context.

The 'rule' keyword defines the iRule object itself but does not establish context; only the specific 'when <EVENT>' declaration within the rule determines the available command context.

DThe results of the iRule's conditional statement determines the context.

Conditional statements inside an iRule control the execution path but cannot change or override the context that was already established by the surrounding event declaration.

Concept tested: F5 iRule event context and command availability

Source: https://clouddocs.f5.com/api/irules/when.html

Topics

#iRules#event declaration#context#TCL

Community Discussion

No community discussion yet for this question.

Full 101 Practice