Product Documentation

cmp policylabel

Sep 12, 2016

The following operations can be performed on "cmp policylabel":

add cmp policylabel

Creates a user-defined HTTP compression policy label for default-syntax policies. Policies that you bind to the label are evaluated only if you call the label from another policy.

Synopsys

add cmp policylabel <labelName> -type ( REQ | RES )

Arguments

labelName

Name of the HTTP compression policy label. Must begin with a letter, number, or the underscore character (_). Additional characters allowed, after the first character, are the hyphen (-), period (.) pound sign (#), space ( ), at sign (@), equals (=), and colon (:). The name must be unique within the list of policy labels for compression policies. Can be renamed after the policy label is created.

The following requirement applies only to the NetScaler CLI:

If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my cmp policylabel" or 'my cmp policylabel').

type

Type of packets (request packets or response) against which to match the policies bound to this policy label.

Possible values: REQ, RES

Example

add cmp policylabel cmp_pol_label -type REQ

rm cmp policylabel

Removes an HTTP compression policy label.

Synopsys

rm cmp policylabel <labelName>

Arguments

labelName

Name of the HTTP compression policy label to be removed.

Example

rm cmp policylabel cmp_pol_label

bind cmp policylabel

Binds a default-syntax HTTP compression policy to an HTTP compression policy label.

Synopsys

bind cmp policylabel <labelName> -policyName <string> -priority <positive_integer> [-gotoPriorityExpression <expression>] [-invoke (<labelType> <labelName>) ]

Arguments

labelName

Name of the label to invoke if the current policy evaluates to TRUE.

policyName

Name of the compression policy to bind to the label.

priority

Integer specifying the priority of the policy. The lower the number, the higher the priority. By default, polices within a label are evaluated in the order of their priority numbers.

Minimum value: 1

Maximum value: 2147483647

gotoPriorityExpression

Expression or other value specifying the priority of the next policy, within the policy label, to evaluate if the current policy evaluates to TRUE. Specify one of the following values:

* NEXT - Evaluate the policy with the next higher numbered priority.

* END - Stop evaluation.

* USE_INVOCATION_RESULT - Applicable if this policy invokes another policy label. If the final goto in the invoked policy label has a value of END, the evaluation stops. If the final goto is anything other than END, the current policy label performs a NEXT.

* An expression that evaluates to a number.

If you specify an expression, it's evaluation result determines the next policy to evaluate, as follows:

* If the expression evaluates to a higher numbered priority, that policy is evaluated next.

* If the expression evaluates to the priority of the current policy, the policy with the next higher priority number is evaluated next.

* If the expression evaluates to a priority number that is numerically higher than the highest priority number, policy evaluation ends.

An UNDEF event is triggered if:

* The expression is invalid.

* The expression evaluates to a priority number that is numerically lower than the current policy's priority.

* The expression evaluates to a priority number that is between the current policy's priority number (say, 30) and the highest priority number (say, 100), but does not match any configured priority number (for example, the expression evaluates to the number 85). This example assumes that the priority number increments by 10 for every successive policy, and therefore a priority number of 85 does not exist in the policy label.

invoke

Invoke policies bound to a virtual server or a user-defined policy label. After the invoked policies are evaluated, the flow returns to the policy with the next higher priority number in the original label.

labelType

Type of policy label invocation.

Possible values: reqvserver, resvserver, policylabel

Example

bind cmp policylabel cmp_pol_label -policyName cmp_pol -priority 1

unbind cmp policylabel

Unbinds a default-syntax HTTP compression policy from an HTTP compression policy label.

Synopsys

unbind cmp policylabel <labelName> <policyName> [-priority <positive_integer>]

Arguments

labelName

Name of the HTTP compression policy label from which to unbind the policy.

policyName

Name of the HTTP compression policy to unbind from the policy label.

priority

Priority of the NOPOLICY to unbind. Required only to unbind a NOPOLICY, if it has been bound to this policy label.

Minimum value: 1

Maximum value: 2147483647

Example

unbind cmp policylabel cmp_pol_label cmp_pol

show cmp policylabel

Displays details of configured HTTP compression policy labels.

Synopsys

show cmp policylabel [<labelName>]

Arguments

labelName

Name of the HTTP compression policy label for which to display details.

Outputs

stateflag

type

Type of packets (request packets or response) against which to match the policies bound to this policy label.

numpol

Number of polices bound to label.

hits

Number of times policy label was invoked.

policyName

The compression policy name.

priority

Specifies the priority of the policy.

gotoPriorityExpression

Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.

invoke

Invoke policies bound to a virtual server or a user-defined policy label. After the invoked policies are evaluated, the flow returns to the policy with the next higher priority number in the original label.

labelType

Type of policy label invocation.

labelName

Name of the label to invoke if the current policy evaluates to TRUE.

flowType

Flowtype of the bound compression policy.

description

Description of the policylabel

flags

devno

count

Example

 i) show cmp policylabel cmp_pol_label  ii) show cmp policylabel

stat cmp policylabel

Displays statistics for all compression policy labels.

Synopsys

stat cmp policylabel [<labelName>] [-detail] [-fullValues] [-ntimes <positive_integer>] [-logFile <input_filename>] [-clearstats ( basic | full )]

Arguments

labelName

Name of the compression policy label for which to display statistics. If not specified, statistics are displayed for all compression policy labels.

detail

Specifies detailed output (including more statistics). The output can be quite voluminous. Without this argument, the output will show only a summary.

fullValues

Specifies that numbers and strings should be displayed in their full form. Without this option, long strings are shortened and large numbers are abbreviated

ntimes

The number of times, in intervals of seven seconds, the statistics should be displayed.

Default value: 1

Minimum value: 0

logFile

The name of the log file to be used as input.

clearstats

Clear the statsistics / counters

Possible values: basic, full

Outputs

count

devno

stateflag

Outputs

Policy Label Hits (Hits)

Number of times policy label was invoked.

Related Commands

rename cmp policylabel

Renames a compression policylabel.

Synopsys

rename cmp policylabel <labelName>@ <newName>@

Arguments

labelName

Existing name of the policy label.

newName

New name for the compression policy label. Must begin with an ASCII alphabetic or underscore (_) character, and must contain only ASCII alphanumeric, underscore, hash (#), period (.), space, colon (:), at (@), equals (=), and hyphen (-) characters.

The following requirement applies only to the NetScaler CLI:

If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my cmp policylabel" or 'my cmp policylabel').

Example

rename cmp policylabel oldname newname