action
label
cli
command1 [command2...] [local]
Example:
switch(config-applet)# action 1.0 cli
“show interface e 3/1“
|
Runs the
configured CLI commands. You can optionally run the commands on the module
where the event occurred.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
counter
name
counter
value
val
op
{dec |
inc |
nop |
set}
Example:
switch(config-applet)# action 2.0 counter
name mycounter value 20 op inc
|
Modifies the
counter by the configured value and operation.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
The counter
name can be any case-sensitive, alphanumeric string up to 28 characters. The
val can be an integer from 0 to 2147483647 or a
substituted parameter.
|
action
label
event-default
Example:
switch(config-applet)# action 1.0 event-default
|
Executes the
default action for the associated event.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
forceshut [module
slot |
xbar
xbar-number]
reset-reason
seconds
Example:
switch(config-applet)# action 1.0 forceshut
module 2 reset-reason “flapping links”
|
Forces a
module, crossbar, or the entire system to shut down.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
The reset
reason is a quoted alphanumeric string up to 80 characters.
|
action
label
overbudgetshut [module
slot[-slot]]
Example:
switch(config-applet)# action 1.0
overbudgetshut module 3-5
|
Forces one
or more modules or the entire system to shut down because of a power overbudget
issue.
The
action label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
policy-default
Example:
switch(config-applet)# action 1.0 policy-default
|
Executes
the default action for the policy that you are overriding.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
publish-event
Example:
switch(config-applet)# action 1.0 publish-event
|
Forces the
publication of an application-specific event.
The
action label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
reload [module
slot[-slot]]
Example:
switch(config-applet)# action 1.0 reload
module 3-5
|
Forces one
or more modules or the entire system to reload.
The
action label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
|
action
label
snmp-trap {[intdata1
data [intdata2
data]] [strdata
string]}
Example:
switch(config-applet)# action 1.0 snmp-trap
strdata “temperature problem”
|
Sends an
SNMP trap with the configured data.
The action
label is in the format number1.number2
number1 can be any number up to 16 digits. The range
for
number2 is from 0 to 9.
The
data arguments can by any number up to 80 digits. The
string can be any alphanumeric string up to 80
characters.
|
action
label
syslog [priority
prio-val]
msg
error-message
Example:
switch(config-applet)# action 1.0 syslog
priority notifications msg “cpu high”
|
Sends a
customized syslog message at the configured priority.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
The
error-message can be any quoted alphanumeric string up
to 80 characters.
|
action
label
end
Example:
switch(config-applet)# action 1.0 end
|
Identifies
the end of a conditional action block like if/else and while.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
exit [result ]
Example:
switch(config-applet)# action 1.0 exit 25
|
Exits
from the applet configuration mode that is currently running.
The action label is in the format number1.number2.
number can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
else
Example:
switch(config-applet)# action 1.0 else
|
Identifies the beginning of an
else conditional action block in an
if/else action block.
The action label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
elseif
string-1 {eq |
gt |
ge |
lt |
le |
ne}
string-2
switch(config-applet)# action 1.0 elseif $x ge 10
|
Identifies
the beginning of an
elseif conditional action block in an
else/if action block.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
if
string-1 {eq |
gt |
ge |
lt |
le |
ne}
string-2
switch(config-applet)# action 1.0 if $x lt 10
|
Identifies the beginning of an
if conditional action block.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
if
string-1 {eq |
gt |
ge |
lt |
le |
ne}
string-2
goto
label
switch(config-applet)# action 2.0 if $x lt 10 goto 1.0
|
Instructs
the applet to jump to a given label if the specified condition is true.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
puts
string
Example:
switch(config-applet)# action 2.0 puts "Hello world"
|
Enables
the action of printing data directly to the terminal.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
add {long-integer |
variable-name} {long-integer |
variable-name}
Example:
switch(config-applet)# action 2.0 add $var1 10
|
Specifies
the action of adding two variables.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
decrement
variable-name
long-integer
Example:
switch(config-applet)# action 1.0 decrement $varname 12
|
Specifies
the action of decrementing the value of a variable.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
increment
variable-name
long-integer
Example:
switch(config-applet)# action 2.0 increment $varname 12
|
Specifies
the action of incrementing the value of a variable.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
multiply {long-integer1 |
variable-name1} {long-integer2 |
variable-name2}
switch(config-applet)# action 2.0 multiply 12 35
|
Specifies
the action of multiplying a variable value with a long integer value.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
subtract {long-integer1 |
variable-name1} {long-integer2 |
variable-name2}
Example:
switch(config-applet)# action 2.0 subtract $var1 $var2
|
Specifies
the action of subtracting the value of a variable from another one.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
comment
string
Example:
switch(config-applet)# action 2.0 comment keyvalue
|
Adds
comments to applets.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
break
Example:
switch(config-applet)# action 2.0 break
|
Specifies
the action of exiting from a loop of actions.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
continue
Example:
switch(config-applet)# action 2.0 continue
|
Specifies
the action of continuing with a loop of actions.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
foreach
string-iterator
string-input [string-delimiter]
Example:
switch(config-applet)# action 3.1 foreach _iterator "orange blue green"
|
Specifies
the iteration of an input string using the delimiter as the tokenizing pattern.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
|
action
label
while
string-op-1
operator
string-op-2
Example:
switch(config-applet)# action 3.2 while $i lt 10
|
Identifies
the beginning of a loop action block.
The action
label is in the format number1.number2.
number1 can be any number up to 16 digits. The range
for
number2
is from 0 to 9.
Valid
values for
operator are:
ge,
gt,
eq,
ne,
lt,
le.
|