/
Action-Commands

Action-Commands

Used In: Action sections

Status: Mandatory

The Action-Commands attribute is used to define a series of one or more command strings, entered one per line, to execute for each device that meets the criteria established in the Action-Filter.

Example

Action-Commands: show interfaces

You can extend Action-Commands to specify optional filter criteria, enclosed by curly brackets { } that restrict execution to cases where specific conditions exist. Example:

Action-Commands: { $Vendor eq "Cisco" }

show interfaces

Besides CLI commands, the Action-Commands attribute accepts the sleep directive, which pauses script execution for a specified number of seconds. Syntax for this directive is:

sleep: <numberOfSeconds>

This example shows how a script can be paused for 10 seconds:

Action-Commands:
... <some commands>

sleep: 10
... <more commands>

SET variables may be defined in Action-Commands:

Action-Commands:

SET: $runscript = "no"

SET: $nofireissue = "no"

SET: $do_acl = ""

SET: $do_type = ""

SET: $do_clear = "no"

Related content