ns-assignment
The following operations can be performed on "ns-assignment":
unset ns assignment
Use this command to remove ns assignment settings.Refer to the set ns assignment command for meanings of the arguments.
Synopsis
unset ns assignment <name> -comment
add ns assignment
Creates an assignment of a value to a variable. The variable (the left hand side) may be a singleton variable or a map with a key expression. The value (the right hand side) is computed from an expression and may be used to set the variable or may be added to or subtracted from the current value of a ulong variable or appended to a text variable. The key expression, if present, is evaluated before the value expression. The left hand side variable value may also be cleared, in which case there is no value expression.
Arguments
name Name for the assignment. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the assignment is added.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my assignment" or my assignment).
variable Left hand side of the assigment, of the form $variable-name (for a singleton variabled) or $variable-name, where key-expression is an expression that evaluates to a text string and provides the key to select a map entry
set Right hand side of the assignment. The expression is evaluated and assigned to the left hand variable.
add Right hand side of the assignment. The expression is evaluated and added to the left hand variable.
sub Right hand side of the assignment. The expression is evaluated and subtracted from the left hand variable.
append Right hand side of the assignment. The expression is evaluated and appended to the left hand variable.
clear Clear the variable value. Deallocates a text value, and for a map, the text key.
comment Comment. Can be used to preserve information about this rewrite action.
rename ns assignment
Renames an assignment.
Synopsis
rename ns assignment <name>@ <newName>@
Arguments
name Existing name of the assignment.
newName New name for the assignment. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the rewrite policy is added.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my assignment" or my assignment).
Example
rename ns assignment oldname newname
set ns assignment
Sets an assignment of a value to a variable.
Arguments
name Name for the assignment. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the assignment is added.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my assignment" or my assignment).
variable Left hand side of the assigment, of the form $variable-name (for a singleton variabled) or $variable-name, where key-expression is an expression that evaluates to a text string and provides the key to select a map entry
set Right hand side of the assignment. The expression is evaluated and assigned to the left hand variable.
add Right hand side of the assignment. The expression is evaluated and added to the left hand variable.
sub Right hand side of the assignment. The expression is evaluated and subtracted from the left hand variable.
append Right hand side of the assignment. The expression is evaluated and appended to the left hand variable.
clear Clear the variable value. Deallocates a text value, and for a map, the text key.
comment Comment. Can be used to preserve information about this rewrite action.
rm ns assignment
Removes a rewrite action.
Synopsis
rm ns assignment <name>
Arguments
name Name for the assignment. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the assignment is added.
The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, "my assignment" or my assignment).
Example
rm ns assignment set_user_privilege
show ns assignment
Displays configured assignements.
Arguments
name Name of the assignment
Output
stateflag variable Left hand side of the assignment.
set Right hand side of the assignment, variable set to expression value.
add Right hand side of the assignment, expression value added to variable.
sub Right hand side of the assignment, expression value subtracted from variable.
append Right hand side of the assignment, expression value appended to vari able.
clear Variable cleared.
hits The number of times the action has been taken.
undefHits The number of times the action resulted in UNDEF.
referenceCount The number of references to the action.
comment Comment. Can be used to preserve information about this rewrite action.
devno count
Example
show ns assignment